//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension CloudDirectory {
    // MARK: Enums

    public enum BatchReadExceptionType: String, CustomStringConvertible, Codable {
        case accessdeniedexception = "AccessDeniedException"
        case cannotlistparentofrootexception = "CannotListParentOfRootException"
        case directorynotenabledexception = "DirectoryNotEnabledException"
        case facetvalidationexception = "FacetValidationException"
        case internalserviceexception = "InternalServiceException"
        case invalidarnexception = "InvalidArnException"
        case invalidnexttokenexception = "InvalidNextTokenException"
        case limitexceededexception = "LimitExceededException"
        case notindexexception = "NotIndexException"
        case notnodeexception = "NotNodeException"
        case notpolicyexception = "NotPolicyException"
        case resourcenotfoundexception = "ResourceNotFoundException"
        case validationexception = "ValidationException"
        public var description: String { return self.rawValue }
    }

    public enum ConsistencyLevel: String, CustomStringConvertible, Codable {
        case eventual = "EVENTUAL"
        case serializable = "SERIALIZABLE"
        public var description: String { return self.rawValue }
    }

    public enum DirectoryState: String, CustomStringConvertible, Codable {
        case deleted = "DELETED"
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum FacetAttributeType: String, CustomStringConvertible, Codable {
        case binary = "BINARY"
        case boolean = "BOOLEAN"
        case datetime = "DATETIME"
        case number = "NUMBER"
        case string = "STRING"
        case variant = "VARIANT"
        public var description: String { return self.rawValue }
    }

    public enum FacetStyle: String, CustomStringConvertible, Codable {
        case dynamic = "DYNAMIC"
        case `static` = "STATIC"
        public var description: String { return self.rawValue }
    }

    public enum ObjectType: String, CustomStringConvertible, Codable {
        case index = "INDEX"
        case leafNode = "LEAF_NODE"
        case node = "NODE"
        case policy = "POLICY"
        public var description: String { return self.rawValue }
    }

    public enum RangeMode: String, CustomStringConvertible, Codable {
        case exclusive = "EXCLUSIVE"
        case first = "FIRST"
        case inclusive = "INCLUSIVE"
        case last = "LAST"
        case lastBeforeMissingValues = "LAST_BEFORE_MISSING_VALUES"
        public var description: String { return self.rawValue }
    }

    public enum RequiredAttributeBehavior: String, CustomStringConvertible, Codable {
        case notRequired = "NOT_REQUIRED"
        case requiredAlways = "REQUIRED_ALWAYS"
        public var description: String { return self.rawValue }
    }

    public enum RuleType: String, CustomStringConvertible, Codable {
        case binaryLength = "BINARY_LENGTH"
        case numberComparison = "NUMBER_COMPARISON"
        case stringFromSet = "STRING_FROM_SET"
        case stringLength = "STRING_LENGTH"
        public var description: String { return self.rawValue }
    }

    public enum UpdateActionType: String, CustomStringConvertible, Codable {
        case createOrUpdate = "CREATE_OR_UPDATE"
        case delete = "DELETE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AddFacetToObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// Attributes on the facet that you are adding to the object.
        public let objectAttributeList: [AttributeKeyAndValue]?
        /// A reference to the object you are adding the specified facet to.
        public let objectReference: ObjectReference
        /// Identifiers for the facet that you are adding to the object. See SchemaFacet for details.
        public let schemaFacet: SchemaFacet

        public init(directoryArn: String, objectAttributeList: [AttributeKeyAndValue]? = nil, objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.directoryArn = directoryArn
            self.objectAttributeList = objectAttributeList
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.objectAttributeList?.forEach {
                try $0.validate(name: "\(name).objectAttributeList[]")
            }
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case objectAttributeList = "ObjectAttributeList"
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct AddFacetToObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ApplySchemaRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory into which the schema is copied. For more information, see arns.
        public let directoryArn: String
        /// Published schema Amazon Resource Name (ARN) that needs to be copied. For more information, see arns.
        public let publishedSchemaArn: String

        public init(directoryArn: String, publishedSchemaArn: String) {
            self.directoryArn = directoryArn
            self.publishedSchemaArn = publishedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case publishedSchemaArn = "PublishedSchemaArn"
        }
    }

    public struct ApplySchemaResponse: AWSDecodableShape {
        /// The applied schema ARN that is associated with the copied schema in the Directory. You can use this ARN to describe the schema information applied on this directory. For more information, see arns.
        public let appliedSchemaArn: String?
        /// The ARN that is associated with the Directory. For more information, see arns.
        public let directoryArn: String?

        public init(appliedSchemaArn: String? = nil, directoryArn: String? = nil) {
            self.appliedSchemaArn = appliedSchemaArn
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: String, CodingKey {
            case appliedSchemaArn = "AppliedSchemaArn"
            case directoryArn = "DirectoryArn"
        }
    }

    public struct AttachObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The child object reference to be attached to the object.
        public let childReference: ObjectReference
        /// Amazon Resource Name (ARN) that is associated with the Directory where both objects reside. For more information, see arns.
        public let directoryArn: String
        /// The link name with which the child object is attached to the parent.
        public let linkName: String
        /// The parent object reference.
        public let parentReference: ObjectReference

        public init(childReference: ObjectReference, directoryArn: String, linkName: String, parentReference: ObjectReference) {
            self.childReference = childReference
            self.directoryArn = directoryArn
            self.linkName = linkName
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
        }

        private enum CodingKeys: String, CodingKey {
            case childReference = "ChildReference"
            case linkName = "LinkName"
            case parentReference = "ParentReference"
        }
    }

    public struct AttachObjectResponse: AWSDecodableShape {
        /// The attached ObjectIdentifier, which is the child ObjectIdentifier.
        public let attachedObjectIdentifier: String?

        public init(attachedObjectIdentifier: String? = nil) {
            self.attachedObjectIdentifier = attachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case attachedObjectIdentifier = "AttachedObjectIdentifier"
        }
    }

    public struct AttachPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory where both objects reside. For more information, see arns.
        public let directoryArn: String
        /// The reference that identifies the object to which the policy will be attached.
        public let objectReference: ObjectReference
        /// The reference that is associated with the policy object.
        public let policyReference: ObjectReference

        public init(directoryArn: String, objectReference: ObjectReference, policyReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.objectReference = objectReference
            self.policyReference = policyReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case policyReference = "PolicyReference"
        }
    }

    public struct AttachPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttachToIndexRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) of the directory where the object and index exist.
        public let directoryArn: String
        /// A reference to the index that you are attaching the object to.
        public let indexReference: ObjectReference
        /// A reference to the object that you are attaching to the index.
        public let targetReference: ObjectReference

        public init(directoryArn: String, indexReference: ObjectReference, targetReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.indexReference = indexReference
            self.targetReference = targetReference
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case targetReference = "TargetReference"
        }
    }

    public struct AttachToIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the object that was attached to the index.
        public let attachedObjectIdentifier: String?

        public init(attachedObjectIdentifier: String? = nil) {
            self.attachedObjectIdentifier = attachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case attachedObjectIdentifier = "AttachedObjectIdentifier"
        }
    }

    public struct AttachTypedLinkRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// A set of attributes that are associated with the typed link.
        public let attributes: [AttributeNameAndValue]
        /// The Amazon Resource Name (ARN) of the directory where you want to attach the typed link.
        public let directoryArn: String
        /// Identifies the source object that the typed link will attach to.
        public let sourceObjectReference: ObjectReference
        /// Identifies the target object that the typed link will attach to.
        public let targetObjectReference: ObjectReference
        /// Identifies the typed link facet that is associated with the typed link.
        public let typedLinkFacet: TypedLinkSchemaAndFacetName

        public init(attributes: [AttributeNameAndValue], directoryArn: String, sourceObjectReference: ObjectReference, targetObjectReference: ObjectReference, typedLinkFacet: TypedLinkSchemaAndFacetName) {
            self.attributes = attributes
            self.directoryArn = directoryArn
            self.sourceObjectReference = sourceObjectReference
            self.targetObjectReference = targetObjectReference
            self.typedLinkFacet = typedLinkFacet
        }

        public func validate(name: String) throws {
            try self.attributes.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.typedLinkFacet.validate(name: "\(name).typedLinkFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case sourceObjectReference = "SourceObjectReference"
            case targetObjectReference = "TargetObjectReference"
            case typedLinkFacet = "TypedLinkFacet"
        }
    }

    public struct AttachTypedLinkResponse: AWSDecodableShape {
        /// Returns a typed link specifier as output.
        public let typedLinkSpecifier: TypedLinkSpecifier?

        public init(typedLinkSpecifier: TypedLinkSpecifier? = nil) {
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        private enum CodingKeys: String, CodingKey {
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct AttributeKey: AWSEncodableShape & AWSDecodableShape {
        /// The name of the facet that the attribute exists within.
        public let facetName: String
        /// The name of the attribute.
        public let name: String
        /// The Amazon Resource Name (ARN) of the schema that contains the facet and attribute.
        public let schemaArn: String

        public init(facetName: String, name: String, schemaArn: String) {
            self.facetName = facetName
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.facetName, name: "facetName", parent: name, max: 64)
            try self.validate(self.facetName, name: "facetName", parent: name, min: 1)
            try self.validate(self.facetName, name: "facetName", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 230)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case facetName = "FacetName"
            case name = "Name"
            case schemaArn = "SchemaArn"
        }
    }

    public struct AttributeKeyAndValue: AWSEncodableShape & AWSDecodableShape {
        /// The key of the attribute.
        public let key: AttributeKey
        /// The value of the attribute.
        public let value: TypedAttributeValue

        public init(key: AttributeKey, value: TypedAttributeValue) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.key.validate(name: "\(name).key")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct AttributeNameAndValue: AWSEncodableShape & AWSDecodableShape {
        /// The attribute name of the typed link.
        public let attributeName: String
        /// The value for the typed link.
        public let value: TypedAttributeValue

        public init(attributeName: String, value: TypedAttributeValue) {
            self.attributeName = attributeName
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 230)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case value = "Value"
        }
    }

    public struct BatchAddFacetToObject: AWSEncodableShape {
        /// The attributes to set on the object.
        public let objectAttributeList: [AttributeKeyAndValue]
        /// A reference to the object being mutated.
        public let objectReference: ObjectReference
        /// Represents the facet being added to the object.
        public let schemaFacet: SchemaFacet

        public init(objectAttributeList: [AttributeKeyAndValue], objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.objectAttributeList = objectAttributeList
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.objectAttributeList.forEach {
                try $0.validate(name: "\(name).objectAttributeList[]")
            }
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case objectAttributeList = "ObjectAttributeList"
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct BatchAddFacetToObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchAttachObject: AWSEncodableShape {
        /// The child object reference that is to be attached to the object.
        public let childReference: ObjectReference
        /// The name of the link.
        public let linkName: String
        /// The parent object reference.
        public let parentReference: ObjectReference

        public init(childReference: ObjectReference, linkName: String, parentReference: ObjectReference) {
            self.childReference = childReference
            self.linkName = linkName
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
        }

        private enum CodingKeys: String, CodingKey {
            case childReference = "ChildReference"
            case linkName = "LinkName"
            case parentReference = "ParentReference"
        }
    }

    public struct BatchAttachObjectResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the object that has been attached.
        public let attachedObjectIdentifier: String?

        public init(attachedObjectIdentifier: String? = nil) {
            self.attachedObjectIdentifier = attachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case attachedObjectIdentifier
        }
    }

    public struct BatchAttachPolicy: AWSEncodableShape {
        /// The reference that identifies the object to which the policy will be attached.
        public let objectReference: ObjectReference
        /// The reference that is associated with the policy object.
        public let policyReference: ObjectReference

        public init(objectReference: ObjectReference, policyReference: ObjectReference) {
            self.objectReference = objectReference
            self.policyReference = policyReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case policyReference = "PolicyReference"
        }
    }

    public struct BatchAttachPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchAttachToIndex: AWSEncodableShape {
        /// A reference to the index that you are attaching the object to.
        public let indexReference: ObjectReference
        /// A reference to the object that you are attaching to the index.
        public let targetReference: ObjectReference

        public init(indexReference: ObjectReference, targetReference: ObjectReference) {
            self.indexReference = indexReference
            self.targetReference = targetReference
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case targetReference = "TargetReference"
        }
    }

    public struct BatchAttachToIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the object that was attached to the index.
        public let attachedObjectIdentifier: String?

        public init(attachedObjectIdentifier: String? = nil) {
            self.attachedObjectIdentifier = attachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case attachedObjectIdentifier = "AttachedObjectIdentifier"
        }
    }

    public struct BatchAttachTypedLink: AWSEncodableShape {
        /// A set of attributes that are associated with the typed link.
        public let attributes: [AttributeNameAndValue]
        /// Identifies the source object that the typed link will attach to.
        public let sourceObjectReference: ObjectReference
        /// Identifies the target object that the typed link will attach to.
        public let targetObjectReference: ObjectReference
        /// Identifies the typed link facet that is associated with the typed link.
        public let typedLinkFacet: TypedLinkSchemaAndFacetName

        public init(attributes: [AttributeNameAndValue], sourceObjectReference: ObjectReference, targetObjectReference: ObjectReference, typedLinkFacet: TypedLinkSchemaAndFacetName) {
            self.attributes = attributes
            self.sourceObjectReference = sourceObjectReference
            self.targetObjectReference = targetObjectReference
            self.typedLinkFacet = typedLinkFacet
        }

        public func validate(name: String) throws {
            try self.attributes.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.typedLinkFacet.validate(name: "\(name).typedLinkFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case sourceObjectReference = "SourceObjectReference"
            case targetObjectReference = "TargetObjectReference"
            case typedLinkFacet = "TypedLinkFacet"
        }
    }

    public struct BatchAttachTypedLinkResponse: AWSDecodableShape {
        /// Returns a typed link specifier as output.
        public let typedLinkSpecifier: TypedLinkSpecifier?

        public init(typedLinkSpecifier: TypedLinkSpecifier? = nil) {
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        private enum CodingKeys: String, CodingKey {
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct BatchCreateIndex: AWSEncodableShape {
        /// The batch reference name. See Transaction Support for more information.
        public let batchReferenceName: String?
        /// Indicates whether the attribute that is being indexed has unique values or not.
        public let isUnique: Bool
        /// The name of the link between the parent object and the index object.
        public let linkName: String?
        /// Specifies the attributes that should be indexed on. Currently only a single attribute is supported.
        public let orderedIndexedAttributeList: [AttributeKey]
        /// A reference to the parent object that contains the index object.
        public let parentReference: ObjectReference?

        public init(batchReferenceName: String? = nil, isUnique: Bool, linkName: String? = nil, orderedIndexedAttributeList: [AttributeKey], parentReference: ObjectReference? = nil) {
            self.batchReferenceName = batchReferenceName
            self.isUnique = isUnique
            self.linkName = linkName
            self.orderedIndexedAttributeList = orderedIndexedAttributeList
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
            try self.orderedIndexedAttributeList.forEach {
                try $0.validate(name: "\(name).orderedIndexedAttributeList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case batchReferenceName = "BatchReferenceName"
            case isUnique = "IsUnique"
            case linkName = "LinkName"
            case orderedIndexedAttributeList = "OrderedIndexedAttributeList"
            case parentReference = "ParentReference"
        }
    }

    public struct BatchCreateIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the index created by this operation.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct BatchCreateObject: AWSEncodableShape {
        /// The batch reference name. See Transaction Support for more information.
        public let batchReferenceName: String?
        /// The name of the link.
        public let linkName: String?
        /// An attribute map, which contains an attribute ARN as the key and attribute value as the map value.
        public let objectAttributeList: [AttributeKeyAndValue]
        /// If specified, the parent reference to which this object will be attached.
        public let parentReference: ObjectReference?
        /// A list of FacetArns that will be associated with the object. For more information, see arns.
        public let schemaFacet: [SchemaFacet]

        public init(batchReferenceName: String? = nil, linkName: String? = nil, objectAttributeList: [AttributeKeyAndValue], parentReference: ObjectReference? = nil, schemaFacet: [SchemaFacet]) {
            self.batchReferenceName = batchReferenceName
            self.linkName = linkName
            self.objectAttributeList = objectAttributeList
            self.parentReference = parentReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
            try self.objectAttributeList.forEach {
                try $0.validate(name: "\(name).objectAttributeList[]")
            }
            try self.schemaFacet.forEach {
                try $0.validate(name: "\(name).schemaFacet[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case batchReferenceName = "BatchReferenceName"
            case linkName = "LinkName"
            case objectAttributeList = "ObjectAttributeList"
            case parentReference = "ParentReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct BatchCreateObjectResponse: AWSDecodableShape {
        /// The ID that is associated with the object.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct BatchDeleteObject: AWSEncodableShape {
        /// The reference that identifies the object.
        public let objectReference: ObjectReference

        public init(objectReference: ObjectReference) {
            self.objectReference = objectReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchDeleteObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchDetachFromIndex: AWSEncodableShape {
        /// A reference to the index object.
        public let indexReference: ObjectReference
        /// A reference to the object being detached from the index.
        public let targetReference: ObjectReference

        public init(indexReference: ObjectReference, targetReference: ObjectReference) {
            self.indexReference = indexReference
            self.targetReference = targetReference
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case targetReference = "TargetReference"
        }
    }

    public struct BatchDetachFromIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the object that was detached from the index.
        public let detachedObjectIdentifier: String?

        public init(detachedObjectIdentifier: String? = nil) {
            self.detachedObjectIdentifier = detachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case detachedObjectIdentifier = "DetachedObjectIdentifier"
        }
    }

    public struct BatchDetachObject: AWSEncodableShape {
        /// The batch reference name. See Transaction Support for more information.
        public let batchReferenceName: String?
        /// The name of the link.
        public let linkName: String
        /// Parent reference from which the object with the specified link name is detached.
        public let parentReference: ObjectReference

        public init(batchReferenceName: String? = nil, linkName: String, parentReference: ObjectReference) {
            self.batchReferenceName = batchReferenceName
            self.linkName = linkName
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
        }

        private enum CodingKeys: String, CodingKey {
            case batchReferenceName = "BatchReferenceName"
            case linkName = "LinkName"
            case parentReference = "ParentReference"
        }
    }

    public struct BatchDetachObjectResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the detached object.
        public let detachedObjectIdentifier: String?

        public init(detachedObjectIdentifier: String? = nil) {
            self.detachedObjectIdentifier = detachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case detachedObjectIdentifier
        }
    }

    public struct BatchDetachPolicy: AWSEncodableShape {
        /// Reference that identifies the object whose policy object will be detached.
        public let objectReference: ObjectReference
        /// Reference that identifies the policy object.
        public let policyReference: ObjectReference

        public init(objectReference: ObjectReference, policyReference: ObjectReference) {
            self.objectReference = objectReference
            self.policyReference = policyReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case policyReference = "PolicyReference"
        }
    }

    public struct BatchDetachPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchDetachTypedLink: AWSEncodableShape {
        /// Used to accept a typed link specifier as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(typedLinkSpecifier: TypedLinkSpecifier) {
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct BatchDetachTypedLinkResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchGetLinkAttributes: AWSEncodableShape {
        /// A list of attribute names whose values will be retrieved.
        public let attributeNames: [String]
        /// Allows a typed link specifier to be accepted as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(attributeNames: [String], typedLinkSpecifier: TypedLinkSpecifier) {
            self.attributeNames = attributeNames
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 230)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeNames = "AttributeNames"
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct BatchGetLinkAttributesResponse: AWSDecodableShape {
        /// The attributes that are associated with the typed link.
        public let attributes: [AttributeKeyAndValue]?

        public init(attributes: [AttributeKeyAndValue]? = nil) {
            self.attributes = attributes
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
        }
    }

    public struct BatchGetObjectAttributes: AWSEncodableShape {
        /// List of attribute names whose values will be retrieved.
        public let attributeNames: [String]
        /// Reference that identifies the object whose attributes will be retrieved.
        public let objectReference: ObjectReference
        /// Identifier for the facet whose attributes will be retrieved. See SchemaFacet for details.
        public let schemaFacet: SchemaFacet

        public init(attributeNames: [String], objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.attributeNames = attributeNames
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 230)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeNames = "AttributeNames"
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct BatchGetObjectAttributesResponse: AWSDecodableShape {
        /// The attribute values that are associated with an object.
        public let attributes: [AttributeKeyAndValue]?

        public init(attributes: [AttributeKeyAndValue]? = nil) {
            self.attributes = attributes
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
        }
    }

    public struct BatchGetObjectInformation: AWSEncodableShape {
        /// A reference to the object.
        public let objectReference: ObjectReference

        public init(objectReference: ObjectReference) {
            self.objectReference = objectReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchGetObjectInformationResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the specified object.
        public let objectIdentifier: String?
        /// The facets attached to the specified object.
        public let schemaFacets: [SchemaFacet]?

        public init(objectIdentifier: String? = nil, schemaFacets: [SchemaFacet]? = nil) {
            self.objectIdentifier = objectIdentifier
            self.schemaFacets = schemaFacets
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
            case schemaFacets = "SchemaFacets"
        }
    }

    public struct BatchListAttachedIndices: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// A reference to the object that has indices attached.
        public let targetReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, targetReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.targetReference = targetReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case targetReference = "TargetReference"
        }
    }

    public struct BatchListAttachedIndicesResponse: AWSDecodableShape {
        /// The indices attached to the specified object.
        public let indexAttachments: [IndexAttachment]?
        /// The pagination token.
        public let nextToken: String?

        public init(indexAttachments: [IndexAttachment]? = nil, nextToken: String? = nil) {
            self.indexAttachments = indexAttachments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexAttachments = "IndexAttachments"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListIncomingTypedLinks: AWSEncodableShape {
        /// Provides range filters for multiple attributes. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range.
        public let filterAttributeRanges: [TypedLinkAttributeRange]?
        /// Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls.
        public let filterTypedLink: TypedLinkSchemaAndFacetName?
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(filterAttributeRanges: [TypedLinkAttributeRange]? = nil, filterTypedLink: TypedLinkSchemaAndFacetName? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.filterAttributeRanges = filterAttributeRanges
            self.filterTypedLink = filterTypedLink
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.filterAttributeRanges?.forEach {
                try $0.validate(name: "\(name).filterAttributeRanges[]")
            }
            try self.filterTypedLink?.validate(name: "\(name).filterTypedLink")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterAttributeRanges = "FilterAttributeRanges"
            case filterTypedLink = "FilterTypedLink"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListIncomingTypedLinksResponse: AWSDecodableShape {
        /// Returns one or more typed link specifiers as output.
        public let linkSpecifiers: [TypedLinkSpecifier]?
        /// The pagination token.
        public let nextToken: String?

        public init(linkSpecifiers: [TypedLinkSpecifier]? = nil, nextToken: String? = nil) {
            self.linkSpecifiers = linkSpecifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case linkSpecifiers = "LinkSpecifiers"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListIndex: AWSEncodableShape {
        /// The reference to the index to list.
        public let indexReference: ObjectReference
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Specifies the ranges of indexed values that you want to query.
        public let rangesOnIndexedValues: [ObjectAttributeRange]?

        public init(indexReference: ObjectReference, maxResults: Int? = nil, nextToken: String? = nil, rangesOnIndexedValues: [ObjectAttributeRange]? = nil) {
            self.indexReference = indexReference
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.rangesOnIndexedValues = rangesOnIndexedValues
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.rangesOnIndexedValues?.forEach {
                try $0.validate(name: "\(name).rangesOnIndexedValues[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case rangesOnIndexedValues = "RangesOnIndexedValues"
        }
    }

    public struct BatchListIndexResponse: AWSDecodableShape {
        /// The objects and indexed values attached to the index.
        public let indexAttachments: [IndexAttachment]?
        /// The pagination token.
        public let nextToken: String?

        public init(indexAttachments: [IndexAttachment]? = nil, nextToken: String? = nil) {
            self.indexAttachments = indexAttachments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexAttachments = "IndexAttachments"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListObjectAttributes: AWSEncodableShape {
        /// Used to filter the list of object attributes that are associated with a certain facet.
        public let facetFilter: SchemaFacet?
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Reference of the object whose attributes need to be listed.
        public let objectReference: ObjectReference

        public init(facetFilter: SchemaFacet? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.facetFilter = facetFilter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.facetFilter?.validate(name: "\(name).facetFilter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case facetFilter = "FacetFilter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListObjectAttributesResponse: AWSDecodableShape {
        /// The attributes map that is associated with the object. AttributeArn is the key; attribute value is the value.
        public let attributes: [AttributeKeyAndValue]?
        /// The pagination token.
        public let nextToken: String?

        public init(attributes: [AttributeKeyAndValue]? = nil, nextToken: String? = nil) {
            self.attributes = attributes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListObjectChildren: AWSEncodableShape {
        /// Maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Reference of the object for which child objects are being listed.
        public let objectReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListObjectChildrenResponse: AWSDecodableShape {
        /// The children structure, which is a map with the key as the LinkName and ObjectIdentifier as the value.
        public let children: [String: String]?
        /// The pagination token.
        public let nextToken: String?

        public init(children: [String: String]? = nil, nextToken: String? = nil) {
            self.children = children
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case children = "Children"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListObjectParentPaths: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListObjectParentPathsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Returns the path to the ObjectIdentifiers that are associated with the directory.
        public let pathToObjectIdentifiersList: [PathToObjectIdentifiers]?

        public init(nextToken: String? = nil, pathToObjectIdentifiersList: [PathToObjectIdentifiers]? = nil) {
            self.nextToken = nextToken
            self.pathToObjectIdentifiersList = pathToObjectIdentifiersList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case pathToObjectIdentifiersList = "PathToObjectIdentifiersList"
        }
    }

    public struct BatchListObjectParents: AWSEncodableShape {
        public let maxResults: Int?
        public let nextToken: String?
        public let objectReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListObjectParentsResponse: AWSDecodableShape {
        public let nextToken: String?
        public let parentLinks: [ObjectIdentifierAndLinkNameTuple]?

        public init(nextToken: String? = nil, parentLinks: [ObjectIdentifierAndLinkNameTuple]? = nil) {
            self.nextToken = nextToken
            self.parentLinks = parentLinks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case parentLinks = "ParentLinks"
        }
    }

    public struct BatchListObjectPolicies: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListObjectPoliciesResponse: AWSDecodableShape {
        /// A list of policy ObjectIdentifiers, that are attached to the object.
        public let attachedPolicyIds: [String]?
        /// The pagination token.
        public let nextToken: String?

        public init(attachedPolicyIds: [String]? = nil, nextToken: String? = nil) {
            self.attachedPolicyIds = attachedPolicyIds
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attachedPolicyIds = "AttachedPolicyIds"
            case nextToken = "NextToken"
        }
    }

    public struct BatchListOutgoingTypedLinks: AWSEncodableShape {
        /// Provides range filters for multiple attributes. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range.
        public let filterAttributeRanges: [TypedLinkAttributeRange]?
        /// Filters are interpreted in the order of the attributes defined on the typed link facet, not the order they are supplied to any API calls.
        public let filterTypedLink: TypedLinkSchemaAndFacetName?
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(filterAttributeRanges: [TypedLinkAttributeRange]? = nil, filterTypedLink: TypedLinkSchemaAndFacetName? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.filterAttributeRanges = filterAttributeRanges
            self.filterTypedLink = filterTypedLink
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.filterAttributeRanges?.forEach {
                try $0.validate(name: "\(name).filterAttributeRanges[]")
            }
            try self.filterTypedLink?.validate(name: "\(name).filterTypedLink")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case filterAttributeRanges = "FilterAttributeRanges"
            case filterTypedLink = "FilterTypedLink"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchListOutgoingTypedLinksResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Returns a typed link specifier as output.
        public let typedLinkSpecifiers: [TypedLinkSpecifier]?

        public init(nextToken: String? = nil, typedLinkSpecifiers: [TypedLinkSpecifier]? = nil) {
            self.nextToken = nextToken
            self.typedLinkSpecifiers = typedLinkSpecifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case typedLinkSpecifiers = "TypedLinkSpecifiers"
        }
    }

    public struct BatchListPolicyAttachments: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the policy object.
        public let policyReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, policyReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.policyReference = policyReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case policyReference = "PolicyReference"
        }
    }

    public struct BatchListPolicyAttachmentsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// A list of ObjectIdentifiers to which the policy is attached.
        public let objectIdentifiers: [String]?

        public init(nextToken: String? = nil, objectIdentifiers: [String]? = nil) {
            self.nextToken = nextToken
            self.objectIdentifiers = objectIdentifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case objectIdentifiers = "ObjectIdentifiers"
        }
    }

    public struct BatchLookupPolicy: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Reference that identifies the object whose policies will be looked up.
        public let objectReference: ObjectReference

        public init(maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchLookupPolicyResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Provides list of path to policies. Policies contain PolicyId, ObjectIdentifier, and PolicyType. For more information, see Policies.
        public let policyToPathList: [PolicyToPath]?

        public init(nextToken: String? = nil, policyToPathList: [PolicyToPath]? = nil) {
            self.nextToken = nextToken
            self.policyToPathList = policyToPathList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case policyToPathList = "PolicyToPathList"
        }
    }

    public struct BatchReadException: AWSDecodableShape {
        /// An exception message that is associated with the failure.
        public let message: String?
        /// A type of exception, such as InvalidArnException.
        public let type: BatchReadExceptionType?

        public init(message: String? = nil, type: BatchReadExceptionType? = nil) {
            self.message = message
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case message = "Message"
            case type = "Type"
        }
    }

    public struct BatchReadOperation: AWSEncodableShape {
        /// Retrieves attributes that are associated with a typed link.
        public let getLinkAttributes: BatchGetLinkAttributes?
        /// Retrieves attributes within a facet that are associated with an object.
        public let getObjectAttributes: BatchGetObjectAttributes?
        /// Retrieves metadata about an object.
        public let getObjectInformation: BatchGetObjectInformation?
        /// Lists indices attached to an object.
        public let listAttachedIndices: BatchListAttachedIndices?
        /// Returns a paginated list of all the incoming TypedLinkSpecifier information for an object. It also supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
        public let listIncomingTypedLinks: BatchListIncomingTypedLinks?
        /// Lists objects attached to the specified index.
        public let listIndex: BatchListIndex?
        /// Lists all attributes that are associated with an object.
        public let listObjectAttributes: BatchListObjectAttributes?
        /// Returns a paginated list of child objects that are associated with a given object.
        public let listObjectChildren: BatchListObjectChildren?
        /// Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index node objects. For more information about objects, see Directory Structure.
        public let listObjectParentPaths: BatchListObjectParentPaths?
        public let listObjectParents: BatchListObjectParents?
        /// Returns policies attached to an object in pagination fashion.
        public let listObjectPolicies: BatchListObjectPolicies?
        /// Returns a paginated list of all the outgoing TypedLinkSpecifier information for an object. It also supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
        public let listOutgoingTypedLinks: BatchListOutgoingTypedLinks?
        /// Returns all of the ObjectIdentifiers to which a given policy is attached.
        public let listPolicyAttachments: BatchListPolicyAttachments?
        /// Lists all policies from the root of the Directory to the object specified. If there are no policies present, an empty list is returned. If policies are present, and if some objects don't have the policies attached, it returns the ObjectIdentifier for such objects. If policies are present, it returns ObjectIdentifier, policyId, and policyType. Paths that don't lead to the root from the target object are ignored. For more information, see Policies.
        public let lookupPolicy: BatchLookupPolicy?

        public init(getLinkAttributes: BatchGetLinkAttributes? = nil, getObjectAttributes: BatchGetObjectAttributes? = nil, getObjectInformation: BatchGetObjectInformation? = nil, listAttachedIndices: BatchListAttachedIndices? = nil, listIncomingTypedLinks: BatchListIncomingTypedLinks? = nil, listIndex: BatchListIndex? = nil, listObjectAttributes: BatchListObjectAttributes? = nil, listObjectChildren: BatchListObjectChildren? = nil, listObjectParentPaths: BatchListObjectParentPaths? = nil, listObjectParents: BatchListObjectParents? = nil, listObjectPolicies: BatchListObjectPolicies? = nil, listOutgoingTypedLinks: BatchListOutgoingTypedLinks? = nil, listPolicyAttachments: BatchListPolicyAttachments? = nil, lookupPolicy: BatchLookupPolicy? = nil) {
            self.getLinkAttributes = getLinkAttributes
            self.getObjectAttributes = getObjectAttributes
            self.getObjectInformation = getObjectInformation
            self.listAttachedIndices = listAttachedIndices
            self.listIncomingTypedLinks = listIncomingTypedLinks
            self.listIndex = listIndex
            self.listObjectAttributes = listObjectAttributes
            self.listObjectChildren = listObjectChildren
            self.listObjectParentPaths = listObjectParentPaths
            self.listObjectParents = listObjectParents
            self.listObjectPolicies = listObjectPolicies
            self.listOutgoingTypedLinks = listOutgoingTypedLinks
            self.listPolicyAttachments = listPolicyAttachments
            self.lookupPolicy = lookupPolicy
        }

        public func validate(name: String) throws {
            try self.getLinkAttributes?.validate(name: "\(name).getLinkAttributes")
            try self.getObjectAttributes?.validate(name: "\(name).getObjectAttributes")
            try self.listAttachedIndices?.validate(name: "\(name).listAttachedIndices")
            try self.listIncomingTypedLinks?.validate(name: "\(name).listIncomingTypedLinks")
            try self.listIndex?.validate(name: "\(name).listIndex")
            try self.listObjectAttributes?.validate(name: "\(name).listObjectAttributes")
            try self.listObjectChildren?.validate(name: "\(name).listObjectChildren")
            try self.listObjectParentPaths?.validate(name: "\(name).listObjectParentPaths")
            try self.listObjectParents?.validate(name: "\(name).listObjectParents")
            try self.listObjectPolicies?.validate(name: "\(name).listObjectPolicies")
            try self.listOutgoingTypedLinks?.validate(name: "\(name).listOutgoingTypedLinks")
            try self.listPolicyAttachments?.validate(name: "\(name).listPolicyAttachments")
            try self.lookupPolicy?.validate(name: "\(name).lookupPolicy")
        }

        private enum CodingKeys: String, CodingKey {
            case getLinkAttributes = "GetLinkAttributes"
            case getObjectAttributes = "GetObjectAttributes"
            case getObjectInformation = "GetObjectInformation"
            case listAttachedIndices = "ListAttachedIndices"
            case listIncomingTypedLinks = "ListIncomingTypedLinks"
            case listIndex = "ListIndex"
            case listObjectAttributes = "ListObjectAttributes"
            case listObjectChildren = "ListObjectChildren"
            case listObjectParentPaths = "ListObjectParentPaths"
            case listObjectParents = "ListObjectParents"
            case listObjectPolicies = "ListObjectPolicies"
            case listOutgoingTypedLinks = "ListOutgoingTypedLinks"
            case listPolicyAttachments = "ListPolicyAttachments"
            case lookupPolicy = "LookupPolicy"
        }
    }

    public struct BatchReadOperationResponse: AWSDecodableShape {
        /// Identifies which operation in a batch has failed.
        public let exceptionResponse: BatchReadException?
        /// Identifies which operation in a batch has succeeded.
        public let successfulResponse: BatchReadSuccessfulResponse?

        public init(exceptionResponse: BatchReadException? = nil, successfulResponse: BatchReadSuccessfulResponse? = nil) {
            self.exceptionResponse = exceptionResponse
            self.successfulResponse = successfulResponse
        }

        private enum CodingKeys: String, CodingKey {
            case exceptionResponse = "ExceptionResponse"
            case successfulResponse = "SuccessfulResponse"
        }
    }

    public struct BatchReadRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory. For more information, see arns.
        public let directoryArn: String
        /// A list of operations that are part of the batch.
        public let operations: [BatchReadOperation]

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, operations: [BatchReadOperation]) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.operations = operations
        }

        public func validate(name: String) throws {
            try self.operations.forEach {
                try $0.validate(name: "\(name).operations[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case operations = "Operations"
        }
    }

    public struct BatchReadResponse: AWSDecodableShape {
        /// A list of all the responses for each batch read.
        public let responses: [BatchReadOperationResponse]?

        public init(responses: [BatchReadOperationResponse]? = nil) {
            self.responses = responses
        }

        private enum CodingKeys: String, CodingKey {
            case responses = "Responses"
        }
    }

    public struct BatchReadSuccessfulResponse: AWSDecodableShape {
        /// The list of attributes to retrieve from the typed link.
        public let getLinkAttributes: BatchGetLinkAttributesResponse?
        /// Retrieves attributes within a facet that are associated with an object.
        public let getObjectAttributes: BatchGetObjectAttributesResponse?
        /// Retrieves metadata about an object.
        public let getObjectInformation: BatchGetObjectInformationResponse?
        /// Lists indices attached to an object.
        public let listAttachedIndices: BatchListAttachedIndicesResponse?
        /// Returns a paginated list of all the incoming TypedLinkSpecifier information for an object. It also supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
        public let listIncomingTypedLinks: BatchListIncomingTypedLinksResponse?
        /// Lists objects attached to the specified index.
        public let listIndex: BatchListIndexResponse?
        /// Lists all attributes that are associated with an object.
        public let listObjectAttributes: BatchListObjectAttributesResponse?
        /// Returns a paginated list of child objects that are associated with a given object.
        public let listObjectChildren: BatchListObjectChildrenResponse?
        /// Retrieves all available parent paths for any object type such as node, leaf node, policy node, and index node objects. For more information about objects, see Directory Structure.
        public let listObjectParentPaths: BatchListObjectParentPathsResponse?
        public let listObjectParents: BatchListObjectParentsResponse?
        /// Returns policies attached to an object in pagination fashion.
        public let listObjectPolicies: BatchListObjectPoliciesResponse?
        /// Returns a paginated list of all the outgoing TypedLinkSpecifier information for an object. It also supports filtering by typed link facet and identity attributes. For more information, see Typed Links.
        public let listOutgoingTypedLinks: BatchListOutgoingTypedLinksResponse?
        /// Returns all of the ObjectIdentifiers to which a given policy is attached.
        public let listPolicyAttachments: BatchListPolicyAttachmentsResponse?
        /// Lists all policies from the root of the Directory to the object specified. If there are no policies present, an empty list is returned. If policies are present, and if some objects don't have the policies attached, it returns the ObjectIdentifier for such objects. If policies are present, it returns ObjectIdentifier, policyId, and policyType. Paths that don't lead to the root from the target object are ignored. For more information, see Policies.
        public let lookupPolicy: BatchLookupPolicyResponse?

        public init(getLinkAttributes: BatchGetLinkAttributesResponse? = nil, getObjectAttributes: BatchGetObjectAttributesResponse? = nil, getObjectInformation: BatchGetObjectInformationResponse? = nil, listAttachedIndices: BatchListAttachedIndicesResponse? = nil, listIncomingTypedLinks: BatchListIncomingTypedLinksResponse? = nil, listIndex: BatchListIndexResponse? = nil, listObjectAttributes: BatchListObjectAttributesResponse? = nil, listObjectChildren: BatchListObjectChildrenResponse? = nil, listObjectParentPaths: BatchListObjectParentPathsResponse? = nil, listObjectParents: BatchListObjectParentsResponse? = nil, listObjectPolicies: BatchListObjectPoliciesResponse? = nil, listOutgoingTypedLinks: BatchListOutgoingTypedLinksResponse? = nil, listPolicyAttachments: BatchListPolicyAttachmentsResponse? = nil, lookupPolicy: BatchLookupPolicyResponse? = nil) {
            self.getLinkAttributes = getLinkAttributes
            self.getObjectAttributes = getObjectAttributes
            self.getObjectInformation = getObjectInformation
            self.listAttachedIndices = listAttachedIndices
            self.listIncomingTypedLinks = listIncomingTypedLinks
            self.listIndex = listIndex
            self.listObjectAttributes = listObjectAttributes
            self.listObjectChildren = listObjectChildren
            self.listObjectParentPaths = listObjectParentPaths
            self.listObjectParents = listObjectParents
            self.listObjectPolicies = listObjectPolicies
            self.listOutgoingTypedLinks = listOutgoingTypedLinks
            self.listPolicyAttachments = listPolicyAttachments
            self.lookupPolicy = lookupPolicy
        }

        private enum CodingKeys: String, CodingKey {
            case getLinkAttributes = "GetLinkAttributes"
            case getObjectAttributes = "GetObjectAttributes"
            case getObjectInformation = "GetObjectInformation"
            case listAttachedIndices = "ListAttachedIndices"
            case listIncomingTypedLinks = "ListIncomingTypedLinks"
            case listIndex = "ListIndex"
            case listObjectAttributes = "ListObjectAttributes"
            case listObjectChildren = "ListObjectChildren"
            case listObjectParentPaths = "ListObjectParentPaths"
            case listObjectParents = "ListObjectParents"
            case listObjectPolicies = "ListObjectPolicies"
            case listOutgoingTypedLinks = "ListOutgoingTypedLinks"
            case listPolicyAttachments = "ListPolicyAttachments"
            case lookupPolicy = "LookupPolicy"
        }
    }

    public struct BatchRemoveFacetFromObject: AWSEncodableShape {
        /// A reference to the object whose facet will be removed.
        public let objectReference: ObjectReference
        /// The facet to remove from the object.
        public let schemaFacet: SchemaFacet

        public init(objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct BatchRemoveFacetFromObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchUpdateLinkAttributes: AWSEncodableShape {
        /// The attributes update structure.
        public let attributeUpdates: [LinkAttributeUpdate]
        /// Allows a typed link specifier to be accepted as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(attributeUpdates: [LinkAttributeUpdate], typedLinkSpecifier: TypedLinkSpecifier) {
            self.attributeUpdates = attributeUpdates
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.attributeUpdates.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct BatchUpdateLinkAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct BatchUpdateObjectAttributes: AWSEncodableShape {
        /// Attributes update structure.
        public let attributeUpdates: [ObjectAttributeUpdate]
        /// Reference that identifies the object.
        public let objectReference: ObjectReference

        public init(attributeUpdates: [ObjectAttributeUpdate], objectReference: ObjectReference) {
            self.attributeUpdates = attributeUpdates
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.attributeUpdates.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case objectReference = "ObjectReference"
        }
    }

    public struct BatchUpdateObjectAttributesResponse: AWSDecodableShape {
        /// ID that is associated with the object.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct BatchWriteOperation: AWSEncodableShape {
        /// A batch operation that adds a facet to an object.
        public let addFacetToObject: BatchAddFacetToObject?
        /// Attaches an object to a Directory.
        public let attachObject: BatchAttachObject?
        /// Attaches a policy object to a regular object. An object can have a limited number of attached policies.
        public let attachPolicy: BatchAttachPolicy?
        /// Attaches the specified object to the specified index.
        public let attachToIndex: BatchAttachToIndex?
        /// Attaches a typed link to a specified source and target object. For more information, see Typed Links.
        public let attachTypedLink: BatchAttachTypedLink?
        /// Creates an index object. See Indexing and search for more information.
        public let createIndex: BatchCreateIndex?
        /// Creates an object.
        public let createObject: BatchCreateObject?
        /// Deletes an object in a Directory.
        public let deleteObject: BatchDeleteObject?
        /// Detaches the specified object from the specified index.
        public let detachFromIndex: BatchDetachFromIndex?
        /// Detaches an object from a Directory.
        public let detachObject: BatchDetachObject?
        /// Detaches a policy from a Directory.
        public let detachPolicy: BatchDetachPolicy?
        /// Detaches a typed link from a specified source and target object. For more information, see Typed Links.
        public let detachTypedLink: BatchDetachTypedLink?
        /// A batch operation that removes a facet from an object.
        public let removeFacetFromObject: BatchRemoveFacetFromObject?
        /// Updates a given object's attributes.
        public let updateLinkAttributes: BatchUpdateLinkAttributes?
        /// Updates a given object's attributes.
        public let updateObjectAttributes: BatchUpdateObjectAttributes?

        public init(addFacetToObject: BatchAddFacetToObject? = nil, attachObject: BatchAttachObject? = nil, attachPolicy: BatchAttachPolicy? = nil, attachToIndex: BatchAttachToIndex? = nil, attachTypedLink: BatchAttachTypedLink? = nil, createIndex: BatchCreateIndex? = nil, createObject: BatchCreateObject? = nil, deleteObject: BatchDeleteObject? = nil, detachFromIndex: BatchDetachFromIndex? = nil, detachObject: BatchDetachObject? = nil, detachPolicy: BatchDetachPolicy? = nil, detachTypedLink: BatchDetachTypedLink? = nil, removeFacetFromObject: BatchRemoveFacetFromObject? = nil, updateLinkAttributes: BatchUpdateLinkAttributes? = nil, updateObjectAttributes: BatchUpdateObjectAttributes? = nil) {
            self.addFacetToObject = addFacetToObject
            self.attachObject = attachObject
            self.attachPolicy = attachPolicy
            self.attachToIndex = attachToIndex
            self.attachTypedLink = attachTypedLink
            self.createIndex = createIndex
            self.createObject = createObject
            self.deleteObject = deleteObject
            self.detachFromIndex = detachFromIndex
            self.detachObject = detachObject
            self.detachPolicy = detachPolicy
            self.detachTypedLink = detachTypedLink
            self.removeFacetFromObject = removeFacetFromObject
            self.updateLinkAttributes = updateLinkAttributes
            self.updateObjectAttributes = updateObjectAttributes
        }

        public func validate(name: String) throws {
            try self.addFacetToObject?.validate(name: "\(name).addFacetToObject")
            try self.attachObject?.validate(name: "\(name).attachObject")
            try self.attachTypedLink?.validate(name: "\(name).attachTypedLink")
            try self.createIndex?.validate(name: "\(name).createIndex")
            try self.createObject?.validate(name: "\(name).createObject")
            try self.detachObject?.validate(name: "\(name).detachObject")
            try self.detachTypedLink?.validate(name: "\(name).detachTypedLink")
            try self.removeFacetFromObject?.validate(name: "\(name).removeFacetFromObject")
            try self.updateLinkAttributes?.validate(name: "\(name).updateLinkAttributes")
            try self.updateObjectAttributes?.validate(name: "\(name).updateObjectAttributes")
        }

        private enum CodingKeys: String, CodingKey {
            case addFacetToObject = "AddFacetToObject"
            case attachObject = "AttachObject"
            case attachPolicy = "AttachPolicy"
            case attachToIndex = "AttachToIndex"
            case attachTypedLink = "AttachTypedLink"
            case createIndex = "CreateIndex"
            case createObject = "CreateObject"
            case deleteObject = "DeleteObject"
            case detachFromIndex = "DetachFromIndex"
            case detachObject = "DetachObject"
            case detachPolicy = "DetachPolicy"
            case detachTypedLink = "DetachTypedLink"
            case removeFacetFromObject = "RemoveFacetFromObject"
            case updateLinkAttributes = "UpdateLinkAttributes"
            case updateObjectAttributes = "UpdateObjectAttributes"
        }
    }

    public struct BatchWriteOperationResponse: AWSDecodableShape {
        /// The result of an add facet to object batch operation.
        public let addFacetToObject: BatchAddFacetToObjectResponse?
        /// Attaches an object to a Directory.
        public let attachObject: BatchAttachObjectResponse?
        /// Attaches a policy object to a regular object. An object can have a limited number of attached policies.
        public let attachPolicy: BatchAttachPolicyResponse?
        /// Attaches the specified object to the specified index.
        public let attachToIndex: BatchAttachToIndexResponse?
        /// Attaches a typed link to a specified source and target object. For more information, see Typed Links.
        public let attachTypedLink: BatchAttachTypedLinkResponse?
        /// Creates an index object. See Indexing and search for more information.
        public let createIndex: BatchCreateIndexResponse?
        /// Creates an object in a Directory.
        public let createObject: BatchCreateObjectResponse?
        /// Deletes an object in a Directory.
        public let deleteObject: BatchDeleteObjectResponse?
        /// Detaches the specified object from the specified index.
        public let detachFromIndex: BatchDetachFromIndexResponse?
        /// Detaches an object from a Directory.
        public let detachObject: BatchDetachObjectResponse?
        /// Detaches a policy from a Directory.
        public let detachPolicy: BatchDetachPolicyResponse?
        /// Detaches a typed link from a specified source and target object. For more information, see Typed Links.
        public let detachTypedLink: BatchDetachTypedLinkResponse?
        /// The result of a batch remove facet from object operation.
        public let removeFacetFromObject: BatchRemoveFacetFromObjectResponse?
        /// Represents the output of a BatchWrite response operation.
        public let updateLinkAttributes: BatchUpdateLinkAttributesResponse?
        /// Updates a given object’s attributes.
        public let updateObjectAttributes: BatchUpdateObjectAttributesResponse?

        public init(addFacetToObject: BatchAddFacetToObjectResponse? = nil, attachObject: BatchAttachObjectResponse? = nil, attachPolicy: BatchAttachPolicyResponse? = nil, attachToIndex: BatchAttachToIndexResponse? = nil, attachTypedLink: BatchAttachTypedLinkResponse? = nil, createIndex: BatchCreateIndexResponse? = nil, createObject: BatchCreateObjectResponse? = nil, deleteObject: BatchDeleteObjectResponse? = nil, detachFromIndex: BatchDetachFromIndexResponse? = nil, detachObject: BatchDetachObjectResponse? = nil, detachPolicy: BatchDetachPolicyResponse? = nil, detachTypedLink: BatchDetachTypedLinkResponse? = nil, removeFacetFromObject: BatchRemoveFacetFromObjectResponse? = nil, updateLinkAttributes: BatchUpdateLinkAttributesResponse? = nil, updateObjectAttributes: BatchUpdateObjectAttributesResponse? = nil) {
            self.addFacetToObject = addFacetToObject
            self.attachObject = attachObject
            self.attachPolicy = attachPolicy
            self.attachToIndex = attachToIndex
            self.attachTypedLink = attachTypedLink
            self.createIndex = createIndex
            self.createObject = createObject
            self.deleteObject = deleteObject
            self.detachFromIndex = detachFromIndex
            self.detachObject = detachObject
            self.detachPolicy = detachPolicy
            self.detachTypedLink = detachTypedLink
            self.removeFacetFromObject = removeFacetFromObject
            self.updateLinkAttributes = updateLinkAttributes
            self.updateObjectAttributes = updateObjectAttributes
        }

        private enum CodingKeys: String, CodingKey {
            case addFacetToObject = "AddFacetToObject"
            case attachObject = "AttachObject"
            case attachPolicy = "AttachPolicy"
            case attachToIndex = "AttachToIndex"
            case attachTypedLink = "AttachTypedLink"
            case createIndex = "CreateIndex"
            case createObject = "CreateObject"
            case deleteObject = "DeleteObject"
            case detachFromIndex = "DetachFromIndex"
            case detachObject = "DetachObject"
            case detachPolicy = "DetachPolicy"
            case detachTypedLink = "DetachTypedLink"
            case removeFacetFromObject = "RemoveFacetFromObject"
            case updateLinkAttributes = "UpdateLinkAttributes"
            case updateObjectAttributes = "UpdateObjectAttributes"
        }
    }

    public struct BatchWriteRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory. For more information, see arns.
        public let directoryArn: String
        /// A list of operations that are part of the batch.
        public let operations: [BatchWriteOperation]

        public init(directoryArn: String, operations: [BatchWriteOperation]) {
            self.directoryArn = directoryArn
            self.operations = operations
        }

        public func validate(name: String) throws {
            try self.operations.forEach {
                try $0.validate(name: "\(name).operations[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case operations = "Operations"
        }
    }

    public struct BatchWriteResponse: AWSDecodableShape {
        /// A list of all the responses for each batch write.
        public let responses: [BatchWriteOperationResponse]?

        public init(responses: [BatchWriteOperationResponse]? = nil) {
            self.responses = responses
        }

        private enum CodingKeys: String, CodingKey {
            case responses = "Responses"
        }
    }

    public struct CreateDirectoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The name of the Directory. Should be unique per account, per region.
        public let name: String
        /// The Amazon Resource Name (ARN) of the published schema that will be copied into the data Directory. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct CreateDirectoryResponse: AWSDecodableShape {
        /// The ARN of the published schema in the Directory. Once a published schema is copied into the directory, it has its own ARN, which is referred to applied schema ARN. For more information, see arns.
        public let appliedSchemaArn: String
        /// The ARN that is associated with the Directory. For more information, see arns.
        public let directoryArn: String
        /// The name of the Directory.
        public let name: String
        /// The root object node of the created directory.
        public let objectIdentifier: String

        public init(appliedSchemaArn: String, directoryArn: String, name: String, objectIdentifier: String) {
            self.appliedSchemaArn = appliedSchemaArn
            self.directoryArn = directoryArn
            self.name = name
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case appliedSchemaArn = "AppliedSchemaArn"
            case directoryArn = "DirectoryArn"
            case name = "Name"
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct CreateFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The attributes that are associated with the Facet.
        public let attributes: [FacetAttribute]?
        /// There are two different styles that you can define on any given facet, Static and Dynamic. For static facets, all attributes must be defined in the schema. For dynamic facets, attributes can be defined during data plane operations.
        public let facetStyle: FacetStyle?
        /// The name of the Facet, which is unique for a given schema.
        public let name: String
        /// Specifies whether a given object created from this facet is of type node, leaf node, policy or index.   Node: Can have multiple children but one parent.     Leaf node: Cannot have children but can have multiple parents.     Policy: Allows you to store a policy document and policy type. For more information, see Policies.     Index: Can be created with the Index API.
        public let objectType: ObjectType?
        /// The schema ARN in which the new Facet will be created. For more information, see arns.
        public let schemaArn: String

        public init(attributes: [FacetAttribute]? = nil, facetStyle: FacetStyle? = nil, name: String, objectType: ObjectType? = nil, schemaArn: String) {
            self.attributes = attributes
            self.facetStyle = facetStyle
            self.name = name
            self.objectType = objectType
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case facetStyle = "FacetStyle"
            case name = "Name"
            case objectType = "ObjectType"
        }
    }

    public struct CreateFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateIndexRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory where the index should be created.
        public let directoryArn: String
        /// Indicates whether the attribute that is being indexed has unique values or not.
        public let isUnique: Bool
        /// The name of the link between the parent object and the index object.
        public let linkName: String?
        /// Specifies the attributes that should be indexed on. Currently only a single attribute is supported.
        public let orderedIndexedAttributeList: [AttributeKey]
        /// A reference to the parent object that contains the index object.
        public let parentReference: ObjectReference?

        public init(directoryArn: String, isUnique: Bool, linkName: String? = nil, orderedIndexedAttributeList: [AttributeKey], parentReference: ObjectReference? = nil) {
            self.directoryArn = directoryArn
            self.isUnique = isUnique
            self.linkName = linkName
            self.orderedIndexedAttributeList = orderedIndexedAttributeList
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
            try self.orderedIndexedAttributeList.forEach {
                try $0.validate(name: "\(name).orderedIndexedAttributeList[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case isUnique = "IsUnique"
            case linkName = "LinkName"
            case orderedIndexedAttributeList = "OrderedIndexedAttributeList"
            case parentReference = "ParentReference"
        }
    }

    public struct CreateIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the index created by this operation.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct CreateObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory in which the object will be created. For more information, see arns.
        public let directoryArn: String
        /// The name of link that is used to attach this object to a parent.
        public let linkName: String?
        /// The attribute map whose attribute ARN contains the key and attribute value as the map value.
        public let objectAttributeList: [AttributeKeyAndValue]?
        /// If specified, the parent reference to which this object will be attached.
        public let parentReference: ObjectReference?
        /// A list of schema facets to be associated with the object. Do not provide minor version components. See SchemaFacet for details.
        public let schemaFacets: [SchemaFacet]

        public init(directoryArn: String, linkName: String? = nil, objectAttributeList: [AttributeKeyAndValue]? = nil, parentReference: ObjectReference? = nil, schemaFacets: [SchemaFacet]) {
            self.directoryArn = directoryArn
            self.linkName = linkName
            self.objectAttributeList = objectAttributeList
            self.parentReference = parentReference
            self.schemaFacets = schemaFacets
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
            try self.objectAttributeList?.forEach {
                try $0.validate(name: "\(name).objectAttributeList[]")
            }
            try self.schemaFacets.forEach {
                try $0.validate(name: "\(name).schemaFacets[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case linkName = "LinkName"
            case objectAttributeList = "ObjectAttributeList"
            case parentReference = "ParentReference"
            case schemaFacets = "SchemaFacets"
        }
    }

    public struct CreateObjectResponse: AWSDecodableShape {
        /// The identifier that is associated with the object.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct CreateSchemaRequest: AWSEncodableShape {
        /// The name that is associated with the schema. This is unique to each account and in each region.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct CreateSchemaResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String?

        public init(schemaArn: String? = nil) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case schemaArn = "SchemaArn"
        }
    }

    public struct CreateTypedLinkFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        ///  Facet structure that is associated with the typed link facet.
        public let facet: TypedLinkFacet
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(facet: TypedLinkFacet, schemaArn: String) {
            self.facet = facet
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.facet.validate(name: "\(name).facet")
        }

        private enum CodingKeys: String, CodingKey {
            case facet = "Facet"
        }
    }

    public struct CreateTypedLinkFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDirectoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory to delete.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDirectoryResponse: AWSDecodableShape {
        /// The ARN of the deleted directory.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
        }
    }

    public struct DeleteFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The name of the facet to delete.
        public let name: String
        /// The Amazon Resource Name (ARN) that is associated with the Facet. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// A reference that identifies the object.
        public let objectReference: ObjectReference

        public init(directoryArn: String, objectReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.objectReference = objectReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
        }
    }

    public struct DeleteObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSchemaRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) of the development schema. For more information, see arns.
        public let schemaArn: String

        public init(schemaArn: String) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSchemaResponse: AWSDecodableShape {
        /// The input ARN that is returned as part of the response. For more information, see arns.
        public let schemaArn: String?

        public init(schemaArn: String? = nil) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case schemaArn = "SchemaArn"
        }
    }

    public struct DeleteTypedLinkFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The unique name of the typed link facet.
        public let name: String
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct DeleteTypedLinkFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetachFromIndexRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) of the directory the index and object exist in.
        public let directoryArn: String
        /// A reference to the index object.
        public let indexReference: ObjectReference
        /// A reference to the object being detached from the index.
        public let targetReference: ObjectReference

        public init(directoryArn: String, indexReference: ObjectReference, targetReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.indexReference = indexReference
            self.targetReference = targetReference
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case targetReference = "TargetReference"
        }
    }

    public struct DetachFromIndexResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the object that was detached from the index.
        public let detachedObjectIdentifier: String?

        public init(detachedObjectIdentifier: String? = nil) {
            self.detachedObjectIdentifier = detachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case detachedObjectIdentifier = "DetachedObjectIdentifier"
        }
    }

    public struct DetachObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory where objects reside. For more information, see arns.
        public let directoryArn: String
        /// The link name associated with the object that needs to be detached.
        public let linkName: String
        /// The parent reference from which the object with the specified link name is detached.
        public let parentReference: ObjectReference

        public init(directoryArn: String, linkName: String, parentReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.linkName = linkName
            self.parentReference = parentReference
        }

        public func validate(name: String) throws {
            try self.validate(self.linkName, name: "linkName", parent: name, max: 64)
            try self.validate(self.linkName, name: "linkName", parent: name, min: 1)
            try self.validate(self.linkName, name: "linkName", parent: name, pattern: "[^\\/\\[\\]\\(\\):\\{\\}#@!?\\s\\\\;]+")
        }

        private enum CodingKeys: String, CodingKey {
            case linkName = "LinkName"
            case parentReference = "ParentReference"
        }
    }

    public struct DetachObjectResponse: AWSDecodableShape {
        /// The ObjectIdentifier that was detached from the object.
        public let detachedObjectIdentifier: String?

        public init(detachedObjectIdentifier: String? = nil) {
            self.detachedObjectIdentifier = detachedObjectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case detachedObjectIdentifier = "DetachedObjectIdentifier"
        }
    }

    public struct DetachPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory where both objects reside. For more information, see arns.
        public let directoryArn: String
        /// Reference that identifies the object whose policy object will be detached.
        public let objectReference: ObjectReference
        /// Reference that identifies the policy object.
        public let policyReference: ObjectReference

        public init(directoryArn: String, objectReference: ObjectReference, policyReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.objectReference = objectReference
            self.policyReference = policyReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case policyReference = "PolicyReference"
        }
    }

    public struct DetachPolicyResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetachTypedLinkRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) of the directory where you want to detach the typed link.
        public let directoryArn: String
        /// Used to accept a typed link specifier as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(directoryArn: String, typedLinkSpecifier: TypedLinkSpecifier) {
            self.directoryArn = directoryArn
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct Directory: AWSDecodableShape {
        /// The date and time when the directory was created.
        public let creationDateTime: Date?
        /// The Amazon Resource Name (ARN) that is associated with the directory. For more information, see arns.
        public let directoryArn: String?
        /// The name of the directory.
        public let name: String?
        /// The state of the directory. Can be either Enabled, Disabled, or Deleted.
        public let state: DirectoryState?

        public init(creationDateTime: Date? = nil, directoryArn: String? = nil, name: String? = nil, state: DirectoryState? = nil) {
            self.creationDateTime = creationDateTime
            self.directoryArn = directoryArn
            self.name = name
            self.state = state
        }

        private enum CodingKeys: String, CodingKey {
            case creationDateTime = "CreationDateTime"
            case directoryArn = "DirectoryArn"
            case name = "Name"
            case state = "State"
        }
    }

    public struct DisableDirectoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory to disable.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DisableDirectoryResponse: AWSDecodableShape {
        /// The ARN of the directory that has been disabled.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
        }
    }

    public struct EnableDirectoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory to enable.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct EnableDirectoryResponse: AWSDecodableShape {
        /// The ARN of the enabled directory.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
        }
    }

    public struct Facet: AWSDecodableShape {
        /// There are two different styles that you can define on any given facet, Static and Dynamic. For static facets, all attributes must be defined in the schema. For dynamic facets, attributes can be defined during data plane operations.
        public let facetStyle: FacetStyle?
        /// The name of the Facet.
        public let name: String?
        /// The object type that is associated with the facet. See CreateFacetRequest$ObjectType for more details.
        public let objectType: ObjectType?

        public init(facetStyle: FacetStyle? = nil, name: String? = nil, objectType: ObjectType? = nil) {
            self.facetStyle = facetStyle
            self.name = name
            self.objectType = objectType
        }

        private enum CodingKeys: String, CodingKey {
            case facetStyle = "FacetStyle"
            case name = "Name"
            case objectType = "ObjectType"
        }
    }

    public struct FacetAttribute: AWSEncodableShape & AWSDecodableShape {
        /// A facet attribute consists of either a definition or a reference. This structure contains the attribute definition. See Attribute References for more information.
        public let attributeDefinition: FacetAttributeDefinition?
        /// An attribute reference that is associated with the attribute. See Attribute References for more information.
        public let attributeReference: FacetAttributeReference?
        /// The name of the facet attribute.
        public let name: String
        /// The required behavior of the FacetAttribute.
        public let requiredBehavior: RequiredAttributeBehavior?

        public init(attributeDefinition: FacetAttributeDefinition? = nil, attributeReference: FacetAttributeReference? = nil, name: String, requiredBehavior: RequiredAttributeBehavior? = nil) {
            self.attributeDefinition = attributeDefinition
            self.attributeReference = attributeReference
            self.name = name
            self.requiredBehavior = requiredBehavior
        }

        public func validate(name: String) throws {
            try self.attributeDefinition?.validate(name: "\(name).attributeDefinition")
            try self.attributeReference?.validate(name: "\(name).attributeReference")
            try self.validate(self.name, name: "name", parent: name, max: 230)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeDefinition = "AttributeDefinition"
            case attributeReference = "AttributeReference"
            case name = "Name"
            case requiredBehavior = "RequiredBehavior"
        }
    }

    public struct FacetAttributeDefinition: AWSEncodableShape & AWSDecodableShape {
        /// The default value of the attribute (if configured).
        public let defaultValue: TypedAttributeValue?
        /// Whether the attribute is mutable or not.
        public let isImmutable: Bool?
        /// Validation rules attached to the attribute definition.
        public let rules: [String: Rule]?
        /// The type of the attribute.
        public let type: FacetAttributeType

        public init(defaultValue: TypedAttributeValue? = nil, isImmutable: Bool? = nil, rules: [String: Rule]? = nil, type: FacetAttributeType) {
            self.defaultValue = defaultValue
            self.isImmutable = isImmutable
            self.rules = rules
            self.type = type
        }

        public func validate(name: String) throws {
            try self.rules?.forEach {
                try validate($0.key, name: "rules.key", parent: name, max: 64)
                try validate($0.key, name: "rules.key", parent: name, min: 1)
                try validate($0.key, name: "rules.key", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "DefaultValue"
            case isImmutable = "IsImmutable"
            case rules = "Rules"
            case type = "Type"
        }
    }

    public struct FacetAttributeReference: AWSEncodableShape & AWSDecodableShape {
        /// The target attribute name that is associated with the facet reference. See Attribute References for more information.
        public let targetAttributeName: String
        /// The target facet name that is associated with the facet reference. See Attribute References for more information.
        public let targetFacetName: String

        public init(targetAttributeName: String, targetFacetName: String) {
            self.targetAttributeName = targetAttributeName
            self.targetFacetName = targetFacetName
        }

        public func validate(name: String) throws {
            try self.validate(self.targetAttributeName, name: "targetAttributeName", parent: name, max: 230)
            try self.validate(self.targetAttributeName, name: "targetAttributeName", parent: name, min: 1)
            try self.validate(self.targetAttributeName, name: "targetAttributeName", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            try self.validate(self.targetFacetName, name: "targetFacetName", parent: name, max: 64)
            try self.validate(self.targetFacetName, name: "targetFacetName", parent: name, min: 1)
            try self.validate(self.targetFacetName, name: "targetFacetName", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case targetAttributeName = "TargetAttributeName"
            case targetFacetName = "TargetFacetName"
        }
    }

    public struct FacetAttributeUpdate: AWSEncodableShape {
        /// The action to perform when updating the attribute.
        public let action: UpdateActionType?
        /// The attribute to update.
        public let attribute: FacetAttribute?

        public init(action: UpdateActionType? = nil, attribute: FacetAttribute? = nil) {
            self.action = action
            self.attribute = attribute
        }

        public func validate(name: String) throws {
            try self.attribute?.validate(name: "\(name).attribute")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case attribute = "Attribute"
        }
    }

    public struct GetAppliedSchemaVersionRequest: AWSEncodableShape {
        /// The ARN of the applied schema.
        public let schemaArn: String

        public init(schemaArn: String) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case schemaArn = "SchemaArn"
        }
    }

    public struct GetAppliedSchemaVersionResponse: AWSDecodableShape {
        /// Current applied schema ARN, including the minor version in use if one was provided.
        public let appliedSchemaArn: String?

        public init(appliedSchemaArn: String? = nil) {
            self.appliedSchemaArn = appliedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case appliedSchemaArn = "AppliedSchemaArn"
        }
    }

    public struct GetDirectoryRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory.
        public let directoryArn: String

        public init(directoryArn: String) {
            self.directoryArn = directoryArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetDirectoryResponse: AWSDecodableShape {
        /// Metadata about the directory.
        public let directory: Directory

        public init(directory: Directory) {
            self.directory = directory
        }

        private enum CodingKeys: String, CodingKey {
            case directory = "Directory"
        }
    }

    public struct GetFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The name of the facet to retrieve.
        public let name: String
        /// The Amazon Resource Name (ARN) that is associated with the Facet. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct GetFacetResponse: AWSDecodableShape {
        /// The Facet structure that is associated with the facet.
        public let facet: Facet?

        public init(facet: Facet? = nil) {
            self.facet = facet
        }

        private enum CodingKeys: String, CodingKey {
            case facet = "Facet"
        }
    }

    public struct GetLinkAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// A list of attribute names whose values will be retrieved.
        public let attributeNames: [String]
        /// The consistency level at which to retrieve the attributes on a typed link.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the typed link resides. For more information, see arns or Typed Links.
        public let directoryArn: String
        /// Allows a typed link specifier to be accepted as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(attributeNames: [String], consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, typedLinkSpecifier: TypedLinkSpecifier) {
            self.attributeNames = attributeNames
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 230)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeNames = "AttributeNames"
            case consistencyLevel = "ConsistencyLevel"
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct GetLinkAttributesResponse: AWSDecodableShape {
        /// The attributes that are associated with the typed link.
        public let attributes: [AttributeKeyAndValue]?

        public init(attributes: [AttributeKeyAndValue]? = nil) {
            self.attributes = attributes
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
        }
    }

    public struct GetObjectAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// List of attribute names whose values will be retrieved.
        public let attributeNames: [String]
        /// The consistency level at which to retrieve the attributes on an object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides.
        public let directoryArn: String
        /// Reference that identifies the object whose attributes will be retrieved.
        public let objectReference: ObjectReference
        /// Identifier for the facet whose attributes will be retrieved. See SchemaFacet for details.
        public let schemaFacet: SchemaFacet

        public init(attributeNames: [String], consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.attributeNames = attributeNames
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.attributeNames.forEach {
                try validate($0, name: "attributeNames[]", parent: name, max: 230)
                try validate($0, name: "attributeNames[]", parent: name, min: 1)
                try validate($0, name: "attributeNames[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeNames = "AttributeNames"
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct GetObjectAttributesResponse: AWSDecodableShape {
        /// The attributes that are associated with the object.
        public let attributes: [AttributeKeyAndValue]?

        public init(attributes: [AttributeKeyAndValue]? = nil) {
            self.attributes = attributes
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
        }
    }

    public struct GetObjectInformationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The consistency level at which to retrieve the object information.
        public let consistencyLevel: ConsistencyLevel?
        /// The ARN of the directory being retrieved.
        public let directoryArn: String
        /// A reference to the object.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.objectReference = objectReference
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
        }
    }

    public struct GetObjectInformationResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the specified object.
        public let objectIdentifier: String?
        /// The facets attached to the specified object. Although the response does not include minor version information, the most recently applied minor version of each Facet is in effect. See GetAppliedSchemaVersion for details.
        public let schemaFacets: [SchemaFacet]?

        public init(objectIdentifier: String? = nil, schemaFacets: [SchemaFacet]? = nil) {
            self.objectIdentifier = objectIdentifier
            self.schemaFacets = schemaFacets
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
            case schemaFacets = "SchemaFacets"
        }
    }

    public struct GetSchemaAsJsonRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the schema to retrieve.
        public let schemaArn: String

        public init(schemaArn: String) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetSchemaAsJsonResponse: AWSDecodableShape {
        /// The JSON representation of the schema document.
        public let document: String?
        /// The name of the retrieved schema.
        public let name: String?

        public init(document: String? = nil, name: String? = nil) {
            self.document = document
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case document = "Document"
            case name = "Name"
        }
    }

    public struct GetTypedLinkFacetInformationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The unique name of the typed link facet.
        public let name: String
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct GetTypedLinkFacetInformationResponse: AWSDecodableShape {
        /// The order of identity attributes for the facet, from most significant to least significant. The ability to filter typed links considers the order that the attributes are defined on the typed link facet. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range. Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls. For more information about identity attributes, see Typed Links.
        public let identityAttributeOrder: [String]?

        public init(identityAttributeOrder: [String]? = nil) {
            self.identityAttributeOrder = identityAttributeOrder
        }

        private enum CodingKeys: String, CodingKey {
            case identityAttributeOrder = "IdentityAttributeOrder"
        }
    }

    public struct IndexAttachment: AWSDecodableShape {
        /// The indexed attribute values.
        public let indexedAttributes: [AttributeKeyAndValue]?
        /// In response to ListIndex, the ObjectIdentifier of the object attached to the index. In response to ListAttachedIndices, the ObjectIdentifier of the index attached to the object. This field will always contain the ObjectIdentifier of the object on the opposite side of the attachment specified in the query.
        public let objectIdentifier: String?

        public init(indexedAttributes: [AttributeKeyAndValue]? = nil, objectIdentifier: String? = nil) {
            self.indexedAttributes = indexedAttributes
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case indexedAttributes = "IndexedAttributes"
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct LinkAttributeAction: AWSEncodableShape {
        /// A type that can be either UPDATE_OR_CREATE or DELETE.
        public let attributeActionType: UpdateActionType?
        /// The value that you want to update to.
        public let attributeUpdateValue: TypedAttributeValue?

        public init(attributeActionType: UpdateActionType? = nil, attributeUpdateValue: TypedAttributeValue? = nil) {
            self.attributeActionType = attributeActionType
            self.attributeUpdateValue = attributeUpdateValue
        }

        private enum CodingKeys: String, CodingKey {
            case attributeActionType = "AttributeActionType"
            case attributeUpdateValue = "AttributeUpdateValue"
        }
    }

    public struct LinkAttributeUpdate: AWSEncodableShape {
        /// The action to perform as part of the attribute update.
        public let attributeAction: LinkAttributeAction?
        /// The key of the attribute being updated.
        public let attributeKey: AttributeKey?

        public init(attributeAction: LinkAttributeAction? = nil, attributeKey: AttributeKey? = nil) {
            self.attributeAction = attributeAction
            self.attributeKey = attributeKey
        }

        public func validate(name: String) throws {
            try self.attributeKey?.validate(name: "\(name).attributeKey")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeAction = "AttributeAction"
            case attributeKey = "AttributeKey"
        }
    }

    public struct ListAppliedSchemaArnsRequest: AWSEncodableShape {
        /// The ARN of the directory you are listing.
        public let directoryArn: String
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The response for ListAppliedSchemaArns when this parameter is used will list all minor version ARNs for a major version.
        public let schemaArn: String?

        public init(directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, schemaArn: String? = nil) {
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case schemaArn = "SchemaArn"
        }
    }

    public struct ListAppliedSchemaArnsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The ARNs of schemas that are applied to the directory.
        public let schemaArns: [String]?

        public init(nextToken: String? = nil, schemaArns: [String]? = nil) {
            self.nextToken = nextToken
            self.schemaArns = schemaArns
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case schemaArns = "SchemaArns"
        }
    }

    public struct ListAttachedIndicesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The consistency level to use for this operation.
        public let consistencyLevel: ConsistencyLevel?
        /// The ARN of the directory.
        public let directoryArn: String
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// A reference to the object that has indices attached.
        public let targetReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, targetReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.targetReference = targetReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case targetReference = "TargetReference"
        }
    }

    public struct ListAttachedIndicesResponse: AWSDecodableShape {
        /// The indices attached to the specified object.
        public let indexAttachments: [IndexAttachment]?
        /// The pagination token.
        public let nextToken: String?

        public init(indexAttachments: [IndexAttachment]? = nil, nextToken: String? = nil) {
            self.indexAttachments = indexAttachments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexAttachments = "IndexAttachments"
            case nextToken = "NextToken"
        }
    }

    public struct ListDevelopmentSchemaArnsRequest: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListDevelopmentSchemaArnsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The ARNs of retrieved development schemas.
        public let schemaArns: [String]?

        public init(nextToken: String? = nil, schemaArns: [String]? = nil) {
            self.nextToken = nextToken
            self.schemaArns = schemaArns
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case schemaArns = "SchemaArns"
        }
    }

    public struct ListDirectoriesRequest: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The state of the directories in the list. Can be either Enabled, Disabled, or Deleted.
        public let state: DirectoryState?

        public init(maxResults: Int? = nil, nextToken: String? = nil, state: DirectoryState? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.state = state
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case state
        }
    }

    public struct ListDirectoriesResponse: AWSDecodableShape {
        /// Lists all directories that are associated with your account in pagination fashion.
        public let directories: [Directory]
        /// The pagination token.
        public let nextToken: String?

        public init(directories: [Directory], nextToken: String? = nil) {
            self.directories = directories
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case directories = "Directories"
            case nextToken = "NextToken"
        }
    }

    public struct ListFacetAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The name of the facet whose attributes will be retrieved.
        public let name: String
        /// The pagination token.
        public let nextToken: String?
        /// The ARN of the schema where the facet resides.
        public let schemaArn: String

        public init(maxResults: Int? = nil, name: String, nextToken: String? = nil, schemaArn: String) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case name = "Name"
            case nextToken = "NextToken"
        }
    }

    public struct ListFacetAttributesResponse: AWSDecodableShape {
        /// The attributes attached to the facet.
        public let attributes: [FacetAttribute]?
        /// The pagination token.
        public let nextToken: String?

        public init(attributes: [FacetAttribute]? = nil, nextToken: String? = nil) {
            self.attributes = attributes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case nextToken = "NextToken"
        }
    }

    public struct ListFacetNamesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) to retrieve facet names from.
        public let schemaArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, schemaArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListFacetNamesResponse: AWSDecodableShape {
        /// The names of facets that exist within the schema.
        public let facetNames: [String]?
        /// The pagination token.
        public let nextToken: String?

        public init(facetNames: [String]? = nil, nextToken: String? = nil) {
            self.facetNames = facetNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case facetNames = "FacetNames"
            case nextToken = "NextToken"
        }
    }

    public struct ListIncomingTypedLinksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The consistency level to execute the request at.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) of the directory where you want to list the typed links.
        public let directoryArn: String
        /// Provides range filters for multiple attributes. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range.
        public let filterAttributeRanges: [TypedLinkAttributeRange]?
        /// Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls.
        public let filterTypedLink: TypedLinkSchemaAndFacetName?
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, filterAttributeRanges: [TypedLinkAttributeRange]? = nil, filterTypedLink: TypedLinkSchemaAndFacetName? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.filterAttributeRanges = filterAttributeRanges
            self.filterTypedLink = filterTypedLink
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.filterAttributeRanges?.forEach {
                try $0.validate(name: "\(name).filterAttributeRanges[]")
            }
            try self.filterTypedLink?.validate(name: "\(name).filterTypedLink")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case consistencyLevel = "ConsistencyLevel"
            case filterAttributeRanges = "FilterAttributeRanges"
            case filterTypedLink = "FilterTypedLink"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListIncomingTypedLinksResponse: AWSDecodableShape {
        /// Returns one or more typed link specifiers as output.
        public let linkSpecifiers: [TypedLinkSpecifier]?
        /// The pagination token.
        public let nextToken: String?

        public init(linkSpecifiers: [TypedLinkSpecifier]? = nil, nextToken: String? = nil) {
            self.linkSpecifiers = linkSpecifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case linkSpecifiers = "LinkSpecifiers"
            case nextToken = "NextToken"
        }
    }

    public struct ListIndexRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The consistency level to execute the request at.
        public let consistencyLevel: ConsistencyLevel?
        /// The ARN of the directory that the index exists in.
        public let directoryArn: String
        /// The reference to the index to list.
        public let indexReference: ObjectReference
        /// The maximum number of objects in a single page to retrieve from the index during a request. For more information, see Amazon Cloud Directory Limits.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Specifies the ranges of indexed values that you want to query.
        public let rangesOnIndexedValues: [ObjectAttributeRange]?

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, indexReference: ObjectReference, maxResults: Int? = nil, nextToken: String? = nil, rangesOnIndexedValues: [ObjectAttributeRange]? = nil) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.indexReference = indexReference
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.rangesOnIndexedValues = rangesOnIndexedValues
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.rangesOnIndexedValues?.forEach {
                try $0.validate(name: "\(name).rangesOnIndexedValues[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case indexReference = "IndexReference"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case rangesOnIndexedValues = "RangesOnIndexedValues"
        }
    }

    public struct ListIndexResponse: AWSDecodableShape {
        /// The objects and indexed values attached to the index.
        public let indexAttachments: [IndexAttachment]?
        /// The pagination token.
        public let nextToken: String?

        public init(indexAttachments: [IndexAttachment]? = nil, nextToken: String? = nil) {
            self.indexAttachments = indexAttachments
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexAttachments = "IndexAttachments"
            case nextToken = "NextToken"
        }
    }

    public struct ListManagedSchemaArnsRequest: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The response for ListManagedSchemaArns. When this parameter is used, all minor version ARNs for a major version are listed.
        public let schemaArn: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, schemaArn: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case schemaArn = "SchemaArn"
        }
    }

    public struct ListManagedSchemaArnsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The ARNs for all AWS managed schemas.
        public let schemaArns: [String]?

        public init(nextToken: String? = nil, schemaArns: [String]? = nil) {
            self.nextToken = nextToken
            self.schemaArns = schemaArns
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case schemaArns = "SchemaArns"
        }
    }

    public struct ListObjectAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// Used to filter the list of object attributes that are associated with a certain facet.
        public let facetFilter: SchemaFacet?
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, facetFilter: SchemaFacet? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.facetFilter = facetFilter
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.facetFilter?.validate(name: "\(name).facetFilter")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case facetFilter = "FacetFilter"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListObjectAttributesResponse: AWSDecodableShape {
        /// Attributes map that is associated with the object. AttributeArn is the key, and attribute value is the value.
        public let attributes: [AttributeKeyAndValue]?
        /// The pagination token.
        public let nextToken: String?

        public init(attributes: [AttributeKeyAndValue]? = nil, nextToken: String? = nil) {
            self.attributes = attributes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case nextToken = "NextToken"
        }
    }

    public struct ListObjectChildrenRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object for which child objects are being listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListObjectChildrenResponse: AWSDecodableShape {
        /// Children structure, which is a map with key as the LinkName and ObjectIdentifier as the value.
        public let children: [String: String]?
        /// The pagination token.
        public let nextToken: String?

        public init(children: [String: String]? = nil, nextToken: String? = nil) {
            self.children = children
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case children = "Children"
            case nextToken = "NextToken"
        }
    }

    public struct ListObjectParentPathsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory to which the parent path applies.
        public let directoryArn: String
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object whose parent paths are listed.
        public let objectReference: ObjectReference

        public init(directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListObjectParentPathsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Returns the path to the ObjectIdentifiers that are associated with the directory.
        public let pathToObjectIdentifiersList: [PathToObjectIdentifiers]?

        public init(nextToken: String? = nil, pathToObjectIdentifiersList: [PathToObjectIdentifiers]? = nil) {
            self.nextToken = nextToken
            self.pathToObjectIdentifiersList = pathToObjectIdentifiersList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case pathToObjectIdentifiersList = "PathToObjectIdentifiersList"
        }
    }

    public struct ListObjectParentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// When set to True, returns all ListObjectParentsResponse$ParentLinks. There could be multiple links between a parent-child pair.
        public let includeAllLinksToEachParent: Bool?
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the object for which parent objects are being listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, includeAllLinksToEachParent: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.includeAllLinksToEachParent = includeAllLinksToEachParent
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case includeAllLinksToEachParent = "IncludeAllLinksToEachParent"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListObjectParentsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Returns a list of parent reference and LinkName Tuples.
        public let parentLinks: [ObjectIdentifierAndLinkNameTuple]?
        /// The parent structure, which is a map with key as the ObjectIdentifier and LinkName as the value.
        public let parents: [String: String]?

        public init(nextToken: String? = nil, parentLinks: [ObjectIdentifierAndLinkNameTuple]? = nil, parents: [String: String]? = nil) {
            self.nextToken = nextToken
            self.parentLinks = parentLinks
            self.parents = parents
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case parentLinks = "ParentLinks"
            case parents = "Parents"
        }
    }

    public struct ListObjectPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where objects reside. For more information, see arns.
        public let directoryArn: String
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// Reference that identifies the object for which policies will be listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListObjectPoliciesResponse: AWSDecodableShape {
        /// A list of policy ObjectIdentifiers, that are attached to the object.
        public let attachedPolicyIds: [String]?
        /// The pagination token.
        public let nextToken: String?

        public init(attachedPolicyIds: [String]? = nil, nextToken: String? = nil) {
            self.attachedPolicyIds = attachedPolicyIds
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attachedPolicyIds = "AttachedPolicyIds"
            case nextToken = "NextToken"
        }
    }

    public struct ListOutgoingTypedLinksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The consistency level to execute the request at.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) of the directory where you want to list the typed links.
        public let directoryArn: String
        /// Provides range filters for multiple attributes. When providing ranges to typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range.
        public let filterAttributeRanges: [TypedLinkAttributeRange]?
        /// Filters are interpreted in the order of the attributes defined on the typed link facet, not the order they are supplied to any API calls.
        public let filterTypedLink: TypedLinkSchemaAndFacetName?
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// A reference that identifies the object whose attributes will be listed.
        public let objectReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, filterAttributeRanges: [TypedLinkAttributeRange]? = nil, filterTypedLink: TypedLinkSchemaAndFacetName? = nil, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.filterAttributeRanges = filterAttributeRanges
            self.filterTypedLink = filterTypedLink
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.filterAttributeRanges?.forEach {
                try $0.validate(name: "\(name).filterAttributeRanges[]")
            }
            try self.filterTypedLink?.validate(name: "\(name).filterTypedLink")
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case consistencyLevel = "ConsistencyLevel"
            case filterAttributeRanges = "FilterAttributeRanges"
            case filterTypedLink = "FilterTypedLink"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct ListOutgoingTypedLinksResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Returns a typed link specifier as output.
        public let typedLinkSpecifiers: [TypedLinkSpecifier]?

        public init(nextToken: String? = nil, typedLinkSpecifiers: [TypedLinkSpecifier]? = nil) {
            self.nextToken = nextToken
            self.typedLinkSpecifiers = typedLinkSpecifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case typedLinkSpecifiers = "TypedLinkSpecifiers"
        }
    }

    public struct ListPolicyAttachmentsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "consistencyLevel", location: .header(locationName: "x-amz-consistency-level")),
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Represents the manner and timing in which the successful write or update of an object is reflected in a subsequent read operation of that same object.
        public let consistencyLevel: ConsistencyLevel?
        /// The Amazon Resource Name (ARN) that is associated with the Directory where objects reside. For more information, see arns.
        public let directoryArn: String
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The reference that identifies the policy object.
        public let policyReference: ObjectReference

        public init(consistencyLevel: ConsistencyLevel? = nil, directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, policyReference: ObjectReference) {
            self.consistencyLevel = consistencyLevel
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.policyReference = policyReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case policyReference = "PolicyReference"
        }
    }

    public struct ListPolicyAttachmentsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// A list of ObjectIdentifiers to which the policy is attached.
        public let objectIdentifiers: [String]?

        public init(nextToken: String? = nil, objectIdentifiers: [String]? = nil) {
            self.nextToken = nextToken
            self.objectIdentifiers = objectIdentifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case objectIdentifiers = "ObjectIdentifiers"
        }
    }

    public struct ListPublishedSchemaArnsRequest: AWSEncodableShape {
        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The response for ListPublishedSchemaArns when this parameter is used will list all minor version ARNs for a major version.
        public let schemaArn: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, schemaArn: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case schemaArn = "SchemaArn"
        }
    }

    public struct ListPublishedSchemaArnsResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// The ARNs of published schemas.
        public let schemaArns: [String]?

        public init(nextToken: String? = nil, schemaArns: [String]? = nil) {
            self.nextToken = nextToken
            self.schemaArns = schemaArns
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case schemaArns = "SchemaArns"
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        /// The MaxResults parameter sets the maximum number of results returned in a single page. This is for future use and is not supported currently.
        public let maxResults: Int?
        /// The pagination token. This is for future use. Currently pagination is not supported for tagging.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) of the resource. Tagging is only supported for directories.
        public let resourceArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case resourceArn = "ResourceArn"
        }
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The token to use to retrieve the next page of results. This value is null when there are no more results to return.
        public let nextToken: String?
        /// A list of tag key value pairs that are associated with the response.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case tags = "Tags"
        }
    }

    public struct ListTypedLinkFacetAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The unique name of the typed link facet.
        public let name: String
        /// The pagination token.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(maxResults: Int? = nil, name: String, nextToken: String? = nil, schemaArn: String) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case name = "Name"
            case nextToken = "NextToken"
        }
    }

    public struct ListTypedLinkFacetAttributesResponse: AWSDecodableShape {
        /// An ordered set of attributes associate with the typed link.
        public let attributes: [TypedLinkAttributeDefinition]?
        /// The pagination token.
        public let nextToken: String?

        public init(attributes: [TypedLinkAttributeDefinition]? = nil, nextToken: String? = nil) {
            self.attributes = attributes
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case nextToken = "NextToken"
        }
    }

    public struct ListTypedLinkFacetNamesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The maximum number of results to retrieve.
        public let maxResults: Int?
        /// The pagination token.
        public let nextToken: String?
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, schemaArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
        }
    }

    public struct ListTypedLinkFacetNamesResponse: AWSDecodableShape {
        /// The names of typed link facets that exist within the schema.
        public let facetNames: [String]?
        /// The pagination token.
        public let nextToken: String?

        public init(facetNames: [String]? = nil, nextToken: String? = nil) {
            self.facetNames = facetNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case facetNames = "FacetNames"
            case nextToken = "NextToken"
        }
    }

    public struct LookupPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the Directory. For more information, see arns.
        public let directoryArn: String
        /// The maximum number of items to be retrieved in a single call. This is an approximate number.
        public let maxResults: Int?
        /// The token to request the next page of results.
        public let nextToken: String?
        /// Reference that identifies the object whose policies will be looked up.
        public let objectReference: ObjectReference

        public init(directoryArn: String, maxResults: Int? = nil, nextToken: String? = nil, objectReference: ObjectReference) {
            self.directoryArn = directoryArn
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case objectReference = "ObjectReference"
        }
    }

    public struct LookupPolicyResponse: AWSDecodableShape {
        /// The pagination token.
        public let nextToken: String?
        /// Provides list of path to policies. Policies contain PolicyId, ObjectIdentifier, and PolicyType. For more information, see Policies.
        public let policyToPathList: [PolicyToPath]?

        public init(nextToken: String? = nil, policyToPathList: [PolicyToPath]? = nil) {
            self.nextToken = nextToken
            self.policyToPathList = policyToPathList
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case policyToPathList = "PolicyToPathList"
        }
    }

    public struct ObjectAttributeAction: AWSEncodableShape {
        /// A type that can be either Update or Delete.
        public let objectAttributeActionType: UpdateActionType?
        /// The value that you want to update to.
        public let objectAttributeUpdateValue: TypedAttributeValue?

        public init(objectAttributeActionType: UpdateActionType? = nil, objectAttributeUpdateValue: TypedAttributeValue? = nil) {
            self.objectAttributeActionType = objectAttributeActionType
            self.objectAttributeUpdateValue = objectAttributeUpdateValue
        }

        private enum CodingKeys: String, CodingKey {
            case objectAttributeActionType = "ObjectAttributeActionType"
            case objectAttributeUpdateValue = "ObjectAttributeUpdateValue"
        }
    }

    public struct ObjectAttributeRange: AWSEncodableShape {
        /// The key of the attribute that the attribute range covers.
        public let attributeKey: AttributeKey?
        /// The range of attribute values being selected.
        public let range: TypedAttributeValueRange?

        public init(attributeKey: AttributeKey? = nil, range: TypedAttributeValueRange? = nil) {
            self.attributeKey = attributeKey
            self.range = range
        }

        public func validate(name: String) throws {
            try self.attributeKey?.validate(name: "\(name).attributeKey")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeKey = "AttributeKey"
            case range = "Range"
        }
    }

    public struct ObjectAttributeUpdate: AWSEncodableShape {
        /// The action to perform as part of the attribute update.
        public let objectAttributeAction: ObjectAttributeAction?
        /// The key of the attribute being updated.
        public let objectAttributeKey: AttributeKey?

        public init(objectAttributeAction: ObjectAttributeAction? = nil, objectAttributeKey: AttributeKey? = nil) {
            self.objectAttributeAction = objectAttributeAction
            self.objectAttributeKey = objectAttributeKey
        }

        public func validate(name: String) throws {
            try self.objectAttributeKey?.validate(name: "\(name).objectAttributeKey")
        }

        private enum CodingKeys: String, CodingKey {
            case objectAttributeAction = "ObjectAttributeAction"
            case objectAttributeKey = "ObjectAttributeKey"
        }
    }

    public struct ObjectIdentifierAndLinkNameTuple: AWSDecodableShape {
        /// The name of the link between the parent and the child object.
        public let linkName: String?
        /// The ID that is associated with the object.
        public let objectIdentifier: String?

        public init(linkName: String? = nil, objectIdentifier: String? = nil) {
            self.linkName = linkName
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case linkName = "LinkName"
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct ObjectReference: AWSEncodableShape & AWSDecodableShape {
        /// A path selector supports easy selection of an object by the parent/child links leading to it from the directory root. Use the link names from each parent/child link to construct the path. Path selectors start with a slash (/) and link names are separated by slashes. For more information about paths, see Access Objects. You can identify an object in one of the following ways:    $ObjectIdentifier - An object identifier is an opaque string provided by Amazon Cloud Directory. When creating objects, the system will provide you with the identifier of the created object. An object’s identifier is immutable and no two objects will ever share the same object identifier    /some/path - Identifies the object based on path    #SomeBatchReference - Identifies the object in a batch call
        public let selector: String?

        public init(selector: String? = nil) {
            self.selector = selector
        }

        private enum CodingKeys: String, CodingKey {
            case selector = "Selector"
        }
    }

    public struct PathToObjectIdentifiers: AWSDecodableShape {
        /// Lists ObjectIdentifiers starting from directory root to the object in the request.
        public let objectIdentifiers: [String]?
        /// The path that is used to identify the object starting from directory root.
        public let path: String?

        public init(objectIdentifiers: [String]? = nil, path: String? = nil) {
            self.objectIdentifiers = objectIdentifiers
            self.path = path
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifiers = "ObjectIdentifiers"
            case path = "Path"
        }
    }

    public struct PolicyAttachment: AWSDecodableShape {
        /// The ObjectIdentifier that is associated with PolicyAttachment.
        public let objectIdentifier: String?
        /// The ID of PolicyAttachment.
        public let policyId: String?
        /// The type of policy that can be associated with PolicyAttachment.
        public let policyType: String?

        public init(objectIdentifier: String? = nil, policyId: String? = nil, policyType: String? = nil) {
            self.objectIdentifier = objectIdentifier
            self.policyId = policyId
            self.policyType = policyType
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
            case policyId = "PolicyId"
            case policyType = "PolicyType"
        }
    }

    public struct PolicyToPath: AWSDecodableShape {
        /// The path that is referenced from the root.
        public let path: String?
        /// List of policy objects.
        public let policies: [PolicyAttachment]?

        public init(path: String? = nil, policies: [PolicyAttachment]? = nil) {
            self.path = path
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case path = "Path"
            case policies = "Policies"
        }
    }

    public struct PublishSchemaRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "developmentSchemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The Amazon Resource Name (ARN) that is associated with the development schema. For more information, see arns.
        public let developmentSchemaArn: String
        /// The minor version under which the schema will be published. This parameter is recommended. Schemas have both a major and minor version associated with them.
        public let minorVersion: String?
        /// The new name under which the schema will be published. If this is not provided, the development schema is considered.
        public let name: String?
        /// The major version under which the schema will be published. Schemas have both a major and minor version associated with them.
        public let version: String

        public init(developmentSchemaArn: String, minorVersion: String? = nil, name: String? = nil, version: String) {
            self.developmentSchemaArn = developmentSchemaArn
            self.minorVersion = minorVersion
            self.name = name
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, max: 10)
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, min: 1)
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
            try self.validate(self.version, name: "version", parent: name, max: 10)
            try self.validate(self.version, name: "version", parent: name, min: 1)
            try self.validate(self.version, name: "version", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case minorVersion = "MinorVersion"
            case name = "Name"
            case version = "Version"
        }
    }

    public struct PublishSchemaResponse: AWSDecodableShape {
        /// The ARN that is associated with the published schema. For more information, see arns.
        public let publishedSchemaArn: String?

        public init(publishedSchemaArn: String? = nil) {
            self.publishedSchemaArn = publishedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case publishedSchemaArn = "PublishedSchemaArn"
        }
    }

    public struct PutSchemaFromJsonRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The replacement JSON schema.
        public let document: String
        /// The ARN of the schema to update.
        public let schemaArn: String

        public init(document: String, schemaArn: String) {
            self.document = document
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case document = "Document"
        }
    }

    public struct PutSchemaFromJsonResponse: AWSDecodableShape {
        /// The ARN of the schema to update.
        public let arn: String?

        public init(arn: String? = nil) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn = "Arn"
        }
    }

    public struct RemoveFacetFromObjectRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The ARN of the directory in which the object resides.
        public let directoryArn: String
        /// A reference to the object to remove the facet from.
        public let objectReference: ObjectReference
        /// The facet to remove. See SchemaFacet for details.
        public let schemaFacet: SchemaFacet

        public init(directoryArn: String, objectReference: ObjectReference, schemaFacet: SchemaFacet) {
            self.directoryArn = directoryArn
            self.objectReference = objectReference
            self.schemaFacet = schemaFacet
        }

        public func validate(name: String) throws {
            try self.schemaFacet.validate(name: "\(name).schemaFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case objectReference = "ObjectReference"
            case schemaFacet = "SchemaFacet"
        }
    }

    public struct RemoveFacetFromObjectResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Rule: AWSEncodableShape & AWSDecodableShape {
        /// The minimum and maximum parameters that are associated with the rule.
        public let parameters: [String: String]?
        /// The type of attribute validation rule.
        public let type: RuleType?

        public init(parameters: [String: String]? = nil, type: RuleType? = nil) {
            self.parameters = parameters
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case parameters = "Parameters"
            case type = "Type"
        }
    }

    public struct SchemaFacet: AWSEncodableShape & AWSDecodableShape {
        /// The name of the facet.
        public let facetName: String?
        /// The ARN of the schema that contains the facet with no minor component. See arns and In-Place Schema Upgrade for a description of when to provide minor versions.
        public let schemaArn: String?

        public init(facetName: String? = nil, schemaArn: String? = nil) {
            self.facetName = facetName
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.facetName, name: "facetName", parent: name, max: 64)
            try self.validate(self.facetName, name: "facetName", parent: name, min: 1)
            try self.validate(self.facetName, name: "facetName", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case facetName = "FacetName"
            case schemaArn = "SchemaArn"
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key that is associated with the tag.
        public let key: String?
        /// The value that is associated with the tag.
        public let value: String?

        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource. Tagging is only supported for directories.
        public let resourceArn: String
        /// A list of tag key-value pairs.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tags = "Tags"
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TypedAttributeValue: AWSEncodableShape & AWSDecodableShape {
        /// A binary data value.
        public let binaryValue: Data?
        /// A Boolean data value.
        public let booleanValue: Bool?
        /// A date and time value.
        public let datetimeValue: Date?
        /// A number data value.
        public let numberValue: String?
        /// A string data value.
        public let stringValue: String?

        public init(binaryValue: Data? = nil, booleanValue: Bool? = nil, datetimeValue: Date? = nil, numberValue: String? = nil, stringValue: String? = nil) {
            self.binaryValue = binaryValue
            self.booleanValue = booleanValue
            self.datetimeValue = datetimeValue
            self.numberValue = numberValue
            self.stringValue = stringValue
        }

        private enum CodingKeys: String, CodingKey {
            case binaryValue = "BinaryValue"
            case booleanValue = "BooleanValue"
            case datetimeValue = "DatetimeValue"
            case numberValue = "NumberValue"
            case stringValue = "StringValue"
        }
    }

    public struct TypedAttributeValueRange: AWSEncodableShape {
        /// The inclusive or exclusive range end.
        public let endMode: RangeMode
        /// The attribute value to terminate the range at.
        public let endValue: TypedAttributeValue?
        /// The inclusive or exclusive range start.
        public let startMode: RangeMode
        /// The value to start the range at.
        public let startValue: TypedAttributeValue?

        public init(endMode: RangeMode, endValue: TypedAttributeValue? = nil, startMode: RangeMode, startValue: TypedAttributeValue? = nil) {
            self.endMode = endMode
            self.endValue = endValue
            self.startMode = startMode
            self.startValue = startValue
        }

        private enum CodingKeys: String, CodingKey {
            case endMode = "EndMode"
            case endValue = "EndValue"
            case startMode = "StartMode"
            case startValue = "StartValue"
        }
    }

    public struct TypedLinkAttributeDefinition: AWSEncodableShape & AWSDecodableShape {
        /// The default value of the attribute (if configured).
        public let defaultValue: TypedAttributeValue?
        /// Whether the attribute is mutable or not.
        public let isImmutable: Bool?
        /// The unique name of the typed link attribute.
        public let name: String
        /// The required behavior of the TypedLinkAttributeDefinition.
        public let requiredBehavior: RequiredAttributeBehavior
        /// Validation rules that are attached to the attribute definition.
        public let rules: [String: Rule]?
        /// The type of the attribute.
        public let type: FacetAttributeType

        public init(defaultValue: TypedAttributeValue? = nil, isImmutable: Bool? = nil, name: String, requiredBehavior: RequiredAttributeBehavior, rules: [String: Rule]? = nil, type: FacetAttributeType) {
            self.defaultValue = defaultValue
            self.isImmutable = isImmutable
            self.name = name
            self.requiredBehavior = requiredBehavior
            self.rules = rules
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 230)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            try self.rules?.forEach {
                try validate($0.key, name: "rules.key", parent: name, max: 64)
                try validate($0.key, name: "rules.key", parent: name, min: 1)
                try validate($0.key, name: "rules.key", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case defaultValue = "DefaultValue"
            case isImmutable = "IsImmutable"
            case name = "Name"
            case requiredBehavior = "RequiredBehavior"
            case rules = "Rules"
            case type = "Type"
        }
    }

    public struct TypedLinkAttributeRange: AWSEncodableShape {
        /// The unique name of the typed link attribute.
        public let attributeName: String?
        /// The range of attribute values that are being selected.
        public let range: TypedAttributeValueRange

        public init(attributeName: String? = nil, range: TypedAttributeValueRange) {
            self.attributeName = attributeName
            self.range = range
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 230)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case range = "Range"
        }
    }

    public struct TypedLinkFacet: AWSEncodableShape {
        /// A set of key-value pairs associated with the typed link. Typed link attributes are used when you have data values that are related to the link itself, and not to one of the two objects being linked. Identity attributes also serve to distinguish the link from others of the same type between the same objects.
        public let attributes: [TypedLinkAttributeDefinition]
        /// The set of attributes that distinguish links made from this facet from each other, in the order of significance. Listing typed links can filter on the values of these attributes. See ListOutgoingTypedLinks and ListIncomingTypedLinks for details.
        public let identityAttributeOrder: [String]
        /// The unique name of the typed link facet.
        public let name: String

        public init(attributes: [TypedLinkAttributeDefinition], identityAttributeOrder: [String], name: String) {
            self.attributes = attributes
            self.identityAttributeOrder = identityAttributeOrder
            self.name = name
        }

        public func validate(name: String) throws {
            try self.attributes.forEach {
                try $0.validate(name: "\(name).attributes[]")
            }
            try self.identityAttributeOrder.forEach {
                try validate($0, name: "identityAttributeOrder[]", parent: name, max: 230)
                try validate($0, name: "identityAttributeOrder[]", parent: name, min: 1)
                try validate($0, name: "identityAttributeOrder[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributes = "Attributes"
            case identityAttributeOrder = "IdentityAttributeOrder"
            case name = "Name"
        }
    }

    public struct TypedLinkFacetAttributeUpdate: AWSEncodableShape {
        /// The action to perform when updating the attribute.
        public let action: UpdateActionType
        /// The attribute to update.
        public let attribute: TypedLinkAttributeDefinition

        public init(action: UpdateActionType, attribute: TypedLinkAttributeDefinition) {
            self.action = action
            self.attribute = attribute
        }

        public func validate(name: String) throws {
            try self.attribute.validate(name: "\(name).attribute")
        }

        private enum CodingKeys: String, CodingKey {
            case action = "Action"
            case attribute = "Attribute"
        }
    }

    public struct TypedLinkSchemaAndFacetName: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String
        /// The unique name of the typed link facet.
        public let typedLinkName: String

        public init(schemaArn: String, typedLinkName: String) {
            self.schemaArn = schemaArn
            self.typedLinkName = typedLinkName
        }

        public func validate(name: String) throws {
            try self.validate(self.typedLinkName, name: "typedLinkName", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case schemaArn = "SchemaArn"
            case typedLinkName = "TypedLinkName"
        }
    }

    public struct TypedLinkSpecifier: AWSEncodableShape & AWSDecodableShape {
        /// Identifies the attribute value to update.
        public let identityAttributeValues: [AttributeNameAndValue]
        /// Identifies the source object that the typed link will attach to.
        public let sourceObjectReference: ObjectReference
        /// Identifies the target object that the typed link will attach to.
        public let targetObjectReference: ObjectReference
        /// Identifies the typed link facet that is associated with the typed link.
        public let typedLinkFacet: TypedLinkSchemaAndFacetName

        public init(identityAttributeValues: [AttributeNameAndValue], sourceObjectReference: ObjectReference, targetObjectReference: ObjectReference, typedLinkFacet: TypedLinkSchemaAndFacetName) {
            self.identityAttributeValues = identityAttributeValues
            self.sourceObjectReference = sourceObjectReference
            self.targetObjectReference = targetObjectReference
            self.typedLinkFacet = typedLinkFacet
        }

        public func validate(name: String) throws {
            try self.identityAttributeValues.forEach {
                try $0.validate(name: "\(name).identityAttributeValues[]")
            }
            try self.typedLinkFacet.validate(name: "\(name).typedLinkFacet")
        }

        private enum CodingKeys: String, CodingKey {
            case identityAttributeValues = "IdentityAttributeValues"
            case sourceObjectReference = "SourceObjectReference"
            case targetObjectReference = "TargetObjectReference"
            case typedLinkFacet = "TypedLinkFacet"
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The Amazon Resource Name (ARN) of the resource. Tagging is only supported for directories.
        public let resourceArn: String
        /// Keys of the tag that need to be removed from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn = "ResourceArn"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// List of attributes that need to be updated in a given schema Facet. Each attribute is followed by AttributeAction, which specifies the type of update operation to perform.
        public let attributeUpdates: [FacetAttributeUpdate]?
        /// The name of the facet.
        public let name: String
        /// The object type that is associated with the facet. See CreateFacetRequest$ObjectType for more details.
        public let objectType: ObjectType?
        /// The Amazon Resource Name (ARN) that is associated with the Facet. For more information, see arns.
        public let schemaArn: String

        public init(attributeUpdates: [FacetAttributeUpdate]? = nil, name: String, objectType: ObjectType? = nil, schemaArn: String) {
            self.attributeUpdates = attributeUpdates
            self.name = name
            self.objectType = objectType
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.attributeUpdates?.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
            try self.validate(self.name, name: "name", parent: name, max: 64)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case name = "Name"
            case objectType = "ObjectType"
        }
    }

    public struct UpdateFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateLinkAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The attributes update structure.
        public let attributeUpdates: [LinkAttributeUpdate]
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the updated typed link resides. For more information, see arns or Typed Links.
        public let directoryArn: String
        /// Allows a typed link specifier to be accepted as input.
        public let typedLinkSpecifier: TypedLinkSpecifier

        public init(attributeUpdates: [LinkAttributeUpdate], directoryArn: String, typedLinkSpecifier: TypedLinkSpecifier) {
            self.attributeUpdates = attributeUpdates
            self.directoryArn = directoryArn
            self.typedLinkSpecifier = typedLinkSpecifier
        }

        public func validate(name: String) throws {
            try self.attributeUpdates.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
            try self.typedLinkSpecifier.validate(name: "\(name).typedLinkSpecifier")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case typedLinkSpecifier = "TypedLinkSpecifier"
        }
    }

    public struct UpdateLinkAttributesResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateObjectAttributesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "directoryArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The attributes update structure.
        public let attributeUpdates: [ObjectAttributeUpdate]
        /// The Amazon Resource Name (ARN) that is associated with the Directory where the object resides. For more information, see arns.
        public let directoryArn: String
        /// The reference that identifies the object.
        public let objectReference: ObjectReference

        public init(attributeUpdates: [ObjectAttributeUpdate], directoryArn: String, objectReference: ObjectReference) {
            self.attributeUpdates = attributeUpdates
            self.directoryArn = directoryArn
            self.objectReference = objectReference
        }

        public func validate(name: String) throws {
            try self.attributeUpdates.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case objectReference = "ObjectReference"
        }
    }

    public struct UpdateObjectAttributesResponse: AWSDecodableShape {
        /// The ObjectIdentifier of the updated object.
        public let objectIdentifier: String?

        public init(objectIdentifier: String? = nil) {
            self.objectIdentifier = objectIdentifier
        }

        private enum CodingKeys: String, CodingKey {
            case objectIdentifier = "ObjectIdentifier"
        }
    }

    public struct UpdateSchemaRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// The name of the schema.
        public let name: String
        /// The Amazon Resource Name (ARN) of the development schema. For more information, see arns.
        public let schemaArn: String

        public init(name: String, schemaArn: String) {
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 32)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
        }
    }

    public struct UpdateSchemaResponse: AWSDecodableShape {
        /// The ARN that is associated with the updated schema. For more information, see arns.
        public let schemaArn: String?

        public init(schemaArn: String? = nil) {
            self.schemaArn = schemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case schemaArn = "SchemaArn"
        }
    }

    public struct UpdateTypedLinkFacetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "schemaArn", location: .header(locationName: "x-amz-data-partition"))
        ]

        /// Attributes update structure.
        public let attributeUpdates: [TypedLinkFacetAttributeUpdate]
        /// The order of identity attributes for the facet, from most significant to least significant. The ability to filter typed links considers the order that the attributes are defined on the typed link facet. When providing ranges to a typed link selection, any inexact ranges must be specified at the end. Any attributes that do not have a range specified are presumed to match the entire range. Filters are interpreted in the order of the attributes on the typed link facet, not the order in which they are supplied to any API calls. For more information about identity attributes, see Typed Links.
        public let identityAttributeOrder: [String]
        /// The unique name of the typed link facet.
        public let name: String
        /// The Amazon Resource Name (ARN) that is associated with the schema. For more information, see arns.
        public let schemaArn: String

        public init(attributeUpdates: [TypedLinkFacetAttributeUpdate], identityAttributeOrder: [String], name: String, schemaArn: String) {
            self.attributeUpdates = attributeUpdates
            self.identityAttributeOrder = identityAttributeOrder
            self.name = name
            self.schemaArn = schemaArn
        }

        public func validate(name: String) throws {
            try self.attributeUpdates.forEach {
                try $0.validate(name: "\(name).attributeUpdates[]")
            }
            try self.identityAttributeOrder.forEach {
                try validate($0, name: "identityAttributeOrder[]", parent: name, max: 230)
                try validate($0, name: "identityAttributeOrder[]", parent: name, min: 1)
                try validate($0, name: "identityAttributeOrder[]", parent: name, pattern: "^[a-zA-Z0-9._:-]*$")
            }
            try self.validate(self.name, name: "name", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeUpdates = "AttributeUpdates"
            case identityAttributeOrder = "IdentityAttributeOrder"
            case name = "Name"
        }
    }

    public struct UpdateTypedLinkFacetResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpgradeAppliedSchemaRequest: AWSEncodableShape {
        /// The ARN for the directory to which the upgraded schema will be applied.
        public let directoryArn: String
        /// Used for testing whether the major version schemas are backward compatible or not. If schema compatibility fails, an exception would be thrown else the call would succeed but no changes will be saved. This parameter is optional.
        public let dryRun: Bool?
        /// The revision of the published schema to upgrade the directory to.
        public let publishedSchemaArn: String

        public init(directoryArn: String, dryRun: Bool? = nil, publishedSchemaArn: String) {
            self.directoryArn = directoryArn
            self.dryRun = dryRun
            self.publishedSchemaArn = publishedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
            case dryRun = "DryRun"
            case publishedSchemaArn = "PublishedSchemaArn"
        }
    }

    public struct UpgradeAppliedSchemaResponse: AWSDecodableShape {
        /// The ARN of the directory that is returned as part of the response.
        public let directoryArn: String?
        /// The ARN of the upgraded schema that is returned as part of the response.
        public let upgradedSchemaArn: String?

        public init(directoryArn: String? = nil, upgradedSchemaArn: String? = nil) {
            self.directoryArn = directoryArn
            self.upgradedSchemaArn = upgradedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case directoryArn = "DirectoryArn"
            case upgradedSchemaArn = "UpgradedSchemaArn"
        }
    }

    public struct UpgradePublishedSchemaRequest: AWSEncodableShape {
        /// The ARN of the development schema with the changes used for the upgrade.
        public let developmentSchemaArn: String
        /// Used for testing whether the Development schema provided is backwards compatible, or not, with the publish schema provided by the user to be upgraded. If schema compatibility fails, an exception would be thrown else the call would succeed. This parameter is optional and defaults to false.
        public let dryRun: Bool?
        /// Identifies the minor version of the published schema that will be created. This parameter is NOT optional.
        public let minorVersion: String
        /// The ARN of the published schema to be upgraded.
        public let publishedSchemaArn: String

        public init(developmentSchemaArn: String, dryRun: Bool? = nil, minorVersion: String, publishedSchemaArn: String) {
            self.developmentSchemaArn = developmentSchemaArn
            self.dryRun = dryRun
            self.minorVersion = minorVersion
            self.publishedSchemaArn = publishedSchemaArn
        }

        public func validate(name: String) throws {
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, max: 10)
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, min: 1)
            try self.validate(self.minorVersion, name: "minorVersion", parent: name, pattern: "^[a-zA-Z0-9._-]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case developmentSchemaArn = "DevelopmentSchemaArn"
            case dryRun = "DryRun"
            case minorVersion = "MinorVersion"
            case publishedSchemaArn = "PublishedSchemaArn"
        }
    }

    public struct UpgradePublishedSchemaResponse: AWSDecodableShape {
        /// The ARN of the upgraded schema that is returned as part of the response.
        public let upgradedSchemaArn: String?

        public init(upgradedSchemaArn: String? = nil) {
            self.upgradedSchemaArn = upgradedSchemaArn
        }

        private enum CodingKeys: String, CodingKey {
            case upgradedSchemaArn = "UpgradedSchemaArn"
        }
    }
}
